UNPKG

antora-confluence

Version:

A tool to convert and publish Antora documentation to Confluence

18 lines (17 loc) 894 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const globals_1 = require("@jest/globals"); const FileExclusionService_1 = require("../../lib/service/FileExclusionService"); (0, globals_1.describe)("FileExclusionService", () => { (0, globals_1.it)("should exclude files", () => { const excludedFiles = ["*.xml", "bar/*/foo/*", "**/foo.html"]; const inputFiles = [ "ab/c/d/hello.html", "bar/late/foo/bar.html", "bar/late/hell/uha.html", ]; (0, globals_1.expect)((0, FileExclusionService_1.fileIsExcluded)(inputFiles[0], excludedFiles)).toBe(false); (0, globals_1.expect)((0, FileExclusionService_1.fileIsExcluded)(inputFiles[1], excludedFiles)).toBe(true); (0, globals_1.expect)((0, FileExclusionService_1.fileIsExcluded)(inputFiles[2], excludedFiles)).toBe(false); }); });