vpriya-md-links
Version:
* [1. Preámbulo](#1-preámbulo) * [2. Resumen del proyecto](#2-resumen-del-proyecto) * [3. Objetivos de aprendizaje](#3-objetivos-de-aprendizaje) * [4. Consideraciones generales](#4-consideraciones-generales) * [5. Criterios de aceptación mínimos del p
47 lines (40 loc) • 1.26 kB
JavaScript
import {isMdFile,isFolder,validateOpt,linksMd} from '../index.js'
import {mdLinks} from '../md-links.js'
describe("linksMd", () => {
it("should be a function", () => {
expect(typeof linksMd).toBe("function");
});
it("should return an array", () => {
const path = "pruebas2.md";
const result = linksMd(path);
expect(result).toBeInstanceOf(Array);
});
});
describe("validateOpt", () => {
it("should be a function", () => {
expect(typeof validateOpt).toBe("function");
});
it("should return a promise", () => {
const path = "pruebas2.md";
const result = mdLinks(path);
expect(result).toBeInstanceOf(Promise);
});
});
describe('isMdFile', () => {
it('should be a function', () => {
expect(typeof isMdFile).toBe('function');
});
it('should return true', () => {
const result = isMdFile('pruebas2.md');
expect(result).toBeTruthy();
});
});
describe('isFolder', () => {
it('should be a function', () => {
expect(typeof isFolder).toBe('function');
});
it('should return true', () => {
const result = isFolder('./prueba');
expect(result).toBeTruthy();
});
});