chore: format curriculum (#37912)
This commit is contained in:
committed by
GitHub
parent
45fe3d8814
commit
22fbc62f88
@@ -0,0 +1,30 @@
|
||||
const { codeToBackticks } = require('./transformChallenges');
|
||||
|
||||
/* global expect */
|
||||
|
||||
describe('transformChallenges', () => {
|
||||
describe('codeToBackticks', () => {
|
||||
it('should convert <em> to *', () => {
|
||||
const expected = 'Some *emphasis* here\n';
|
||||
return codeToBackticks('Some <em>emphasis</em> here').then(actual => {
|
||||
expect(actual).toEqual(expected);
|
||||
});
|
||||
});
|
||||
it('should convert <code> to `', () => {
|
||||
const expected = 'Code `code` test\n';
|
||||
return codeToBackticks('Code <code>code</code> test').then(actual => {
|
||||
expect(actual).toEqual(expected);
|
||||
});
|
||||
});
|
||||
it('should convert html entities', () => {
|
||||
const expected =
|
||||
'a `<input type="text" placeholder="this is placeholder text">` test\n';
|
||||
return codeToBackticks(
|
||||
// eslint-disable-next-line max-len
|
||||
'a <code><input type="text" placeholder="this is placeholder text"></code> test\n'
|
||||
).then(actual => {
|
||||
expect(actual).toEqual(expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user