The HTML specification
\n' + + 'The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser.
\n' + + '', + ); + }); + + test('Should create term in table with definition template', () => { + const inputPath = resolve(__dirname, './mocks/term/table.md'); + const input = readFileSync(inputPath, 'utf8'); + const result = transformYfm(input, inputPath); + + expect(clearRandomId(result)).toEqual( + 'Language | \n' + + 'Initial release | \n' + + '
---|---|
HTML | \n' + + '1993 | \n' + + '
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser.
\n' + + '', + ); + }); + + test('Should create term in code with definition template', () => { + const inputPath = resolve(__dirname, './mocks/term/code.md'); + const input = readFileSync(inputPath, 'utf8'); + const result = transformYfm(input, inputPath); + + expect(clearRandomId(result)).toEqual( + 'HTML: Lorem\n' +
+ '
\n' +
+ '\n' +
+ ' \n' +
+ ' The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser.
\n' + + '', + ); + }); + + test('Term should use content from include', () => { + const inputPath = resolve(__dirname, './mocks/term/includeContent.md'); + const input = readFileSync(inputPath, 'utf8'); + const result = transformYfm(input, inputPath); + + expect(clearRandomId(result)).toEqual( + 'The HTML specification
\n' + + 'The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser.
\n' + + '', + ); + }); +});