File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 "watch" : " tsc --watch" ,
1010 "build" : " tsc -p tsconfig.json" ,
1111 "dev" : " node scripts/dev.js" ,
12- "test" : " jasmine"
12+ "test" : " tsc -b spec && jasmine"
1313 },
1414 "keywords" : [],
1515 "author" : " " ,
Original file line number Diff line number Diff line change 1+
2+ class Pattern {
3+ private constructor ( public string :string ) { }
4+ regex = new RegExp ( this . string ) ;
5+ static compile ( regex :string ) {
6+ return new this ( `^${ regex } $` ) ;
7+ }
8+ static matches ( regex :string , target :string ) :boolean {
9+ return new RegExp ( `^${ regex } $` ) . test ( target ) ;
10+ }
11+ matcher ( text :string ) {
12+ return {
13+ replaceAll : ( replacement :string ) => {
14+ return text . replaceAll ( this . regex , replacement ) ;
15+ } ,
16+ matches : ( ) => {
17+ return this . regex . test ( text ) ;
18+ } ,
19+ group : ( ) => {
20+ throw new Error ( "not implemented" ) ;
21+ }
22+ }
23+ }
24+ }
25+
26+ Object . assign ( globalThis , { Pattern} ) ;
Original file line number Diff line number Diff line change 44 " **/*[sS]pec.?(m)js"
55 ],
66 "helpers" : [
7- " helpers/**/*.?(m) js"
7+ " build/env. js"
88 ],
99 "env" : {
1010 "stopSpecOnExpectationFailure" : false ,
You can’t perform that action at this time.
0 commit comments