const { codeToBackticks } = require('./transformChallenges'); /* global expect */ describe('transformChallenges', () => { describe('codeToBackticks', () => { it('should convert to *', () => { const expected = 'Some *emphasis* here\n'; return codeToBackticks('Some emphasis here').then(actual => { expect(actual).toEqual(expected); }); }); it('should convert to `', () => { const expected = 'Code `code` test\n'; return codeToBackticks('Code code test').then(actual => { expect(actual).toEqual(expected); }); }); it('should convert html entities', () => { const expected = 'a `` test\n'; return codeToBackticks( // eslint-disable-next-line max-len 'a <input type="text" placeholder="this is placeholder text"> test\n' ).then(actual => { expect(actual).toEqual(expected); }); }); }); });