File tree Expand file tree Collapse file tree 3 files changed +61
-6
lines changed
Expand file tree Collapse file tree 3 files changed +61
-6
lines changed Original file line number Diff line number Diff line change 9696 "prettier" : " 3.7.3" ,
9797 "publint" : " 0.3.18" ,
9898 "rollup" : " 4.60.0" ,
99- "shescape-previous" : " npm:shescape@2.1.10 " ,
99+ "shescape-previous" : " npm:shescape@2.1.8 " ,
100100 "sinon" : " 21.0.3"
101101 },
102102 "scripts" : {
139139 "mutation:unit" : " stryker run config/stryker/unit.js" ,
140140 "mutation:integration" : " npm run transpile && stryker run config/stryker/integration.js" ,
141141 "test" : " npm-run-all test:*" ,
142- "test:unit" : " ava test/unit/**/*.test.js" ,
142+ "test:unit" : " ava --timeout 59m test/unit/**/*.test.js" ,
143143 "test:integration" : " npm run transpile && ava test/integration/**/*.test.js --timeout 2m" ,
144144 "test:e2e" : " node script/busybox-sh.js && node script/double-link-sh.js && ava test/e2e/**/*.test.js --timeout 1m" ,
145145 "test:compat" : " npm-run-all test:compat:*" ,
Original file line number Diff line number Diff line change 1+ /**
2+ * @overview Contains differential tests for the migration form standard regular
3+ * expressions to linear-time regular expressions in CMD.
4+ * @license MIT
5+ */
6+
7+ import { testProp } from "@fast-check/ava" ;
8+ import * as fc from "fast-check" ;
9+
10+ import * as old from "../../../node_modules/shescape-previous/src/internal/win/cmd.js" ;
11+ import * as upd from "../../../src/internal/win/cmd.js" ;
12+
13+ const numRuns = 10_000_000 ;
14+
15+ testProp (
16+ "escape functionality is unchanged" ,
17+ [ fc . string ( ) ] ,
18+ ( t , arg ) => {
19+ const updFn = upd . getEscapeFunction ( ) ;
20+ const oldFn = old . getEscapeFunction ( ) ;
21+
22+ const got = updFn ( arg ) ;
23+ const want = oldFn ( arg ) ;
24+ t . is ( got , want ) ;
25+ } ,
26+ { numRuns } ,
27+ ) ;
28+
29+ testProp (
30+ "quote functionality is unchanged" ,
31+ [ fc . string ( ) ] ,
32+ ( t , arg ) => {
33+ const updFn = upd . getQuoteFunction ( ) ;
34+ const oldFn = old . getQuoteFunction ( ) ;
35+
36+ const got = updFn [ 0 ] ( updFn [ 1 ] ( arg ) ) ;
37+ const want = oldFn [ 0 ] ( oldFn [ 1 ] ( arg ) ) ;
38+ t . is ( got , want ) ;
39+ } ,
40+ { numRuns } ,
41+ ) ;
42+
43+ testProp (
44+ "flag protection functionality is unchanged" ,
45+ [ fc . string ( ) ] ,
46+ ( t , arg ) => {
47+ const updFn = upd . getFlagProtectionFunction ( ) ;
48+ const oldFn = old . getFlagProtectionFunction ( ) ;
49+
50+ const got = updFn ( arg ) ;
51+ const want = oldFn ( arg ) ;
52+ t . is ( got , want ) ;
53+ } ,
54+ { numRuns } ,
55+ ) ;
You can’t perform that action at this time.
0 commit comments