markdown-url-checker
Version:
The lib takes care of checking every link inside a markdown file to see if they're all up.
21 lines (19 loc) • 751 B
JavaScript
const pegaArquivo = require('../index');
const arrayResult = [
{
FileList: `https://developer.mozilla.org/pt-BR/docs/Web/API/FileList`
}
]
describe('pegaArquivo:: ', () => {
it('deve ser uma funcao', () => {
expect(typeof(pegaArquivo)).toBe('function');
});
it('deve retornar array com resultados', async () => {
const resultado = await pegaArquivo('/home/thiago/Study/nodejs/lib-markdown/test/arquivos/texto1.md')
expect(resultado).toEqual(arrayResult);
});
it('deve retornar mensagem "não há links"', async () => {
const resultado = await pegaArquivo('/home/thiago/Study/nodejs/lib-markdown/test/arquivos/texto2.md')
expect(resultado).toBe('não há links')
});
});