import fs from 'fs'; import path from 'path'; import { parseReadme } from '../src/utils/web-utils'; const readmeFile = (fileName = 'markdown.md') => { return fs.readFileSync(path.join(__dirname, `./partials/readme/${fileName}`)); }; describe('Utilities', () => { describe('parseReadme', () => { test('should parse makrdown text to html template', () => { const markdown = '# markdown'; expect(parseReadme('testPackage', markdown)).toEqual('
%%%%%**##==
'); expect(parseReadme('testPackage', simpleText)).toEqual('simple text
'); expect(parseReadme('testPackage', randomTextMarkdown)).toEqual( 'simple text
\n