11import path from "path" ;
2- import { getOutputId , normalizeFilterPattern } from "../src/helpers" ;
2+ import { getOutputId } from "../src/helpers" ;
33
44test ( "getOutputId" , ( ) => {
55 expect ( getOutputId ( "a.ext" , { dir : "out" } ) ) . toBe ( path . resolve ( "out/a.ext" ) ) ;
@@ -12,23 +12,3 @@ test("getOutputId", () => {
1212 expect ( getOutputId ( "a.ext" , { } ) ) . toBe ( path . resolve ( "a.ext" ) ) ;
1313 expect ( getOutputId ( "a/b.ext" , { } ) ) . toBe ( path . resolve ( "a/b.ext" ) ) ;
1414} ) ;
15-
16- test ( "normalizeFilterPattern" , ( ) => {
17- expect ( normalizeFilterPattern ( ) ) . toBeUndefined ( ) ;
18- expect ( normalizeFilterPattern ( null ) ) . toBeNull ( ) ;
19- expect ( normalizeFilterPattern ( / \. t x t / g) ) . toStrictEqual ( / \. t x t / g) ;
20- expect ( normalizeFilterPattern ( "abc/def/**/*" ) ) . toBe ( "abc/def/**/*" ) ;
21- expect ( normalizeFilterPattern ( "abc\\def\\**\\*" ) ) . toBe ( "abc/def/**/*" ) ;
22- expect ( normalizeFilterPattern ( path . resolve ( "abc/def/**/*" ) ) ) . toBe ( path . resolve ( "abc/def/**/*" ) . replace ( / \\ / g, "/" ) ) ;
23- expect ( [
24- normalizeFilterPattern ( / \. t x t / g) ,
25- normalizeFilterPattern ( "abc/def/**/*" ) ,
26- normalizeFilterPattern ( "abc\\def\\**\\*" ) ,
27- normalizeFilterPattern ( path . resolve ( "abc/def/**/*" ) ) ,
28- ] ) . toStrictEqual ( [
29- / \. t x t / g,
30- "abc/def/**/*" ,
31- "abc/def/**/*" ,
32- path . resolve ( "abc/def/**/*" ) . replace ( / \\ / g, "/" ) ,
33- ] ) ;
34- } ) ;
0 commit comments