@@ -12,7 +12,7 @@ describe("command line", () => {
1212 const commandLine = "--project tsconfig.json --noHeader -t es3 -lt 5.3" ;
1313 const result = tstl . parseCommandLine ( commandLine . split ( " " ) ) ;
1414
15- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
15+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
1616 expect ( result . options ) . toEqual ( {
1717 project : "tsconfig.json" ,
1818 noHeader : true ,
@@ -24,75 +24,75 @@ describe("command line", () => {
2424 test ( "should error on unknown options" , ( ) => {
2525 const result = tstl . parseCommandLine ( [ "--unknownOption" ] ) ;
2626
27- expect ( result . errors ) . toHaveErrorDiagnostics ( ) ;
27+ expect ( result . errors ) . toHaveDiagnostics ( ) ;
2828 } ) ;
2929
3030 test ( "should parse options case-insensitively" , ( ) => {
3131 const result = tstl . parseCommandLine ( [ "--NoHeader" ] ) ;
3232
33- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
33+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
3434 expect ( result . options . noHeader ) . toBe ( true ) ;
3535 } ) ;
3636
3737 describe ( "enum options" , ( ) => {
3838 test ( "should parse enums" , ( ) => {
3939 const result = tstl . parseCommandLine ( [ "--luaTarget" , "5.1" ] ) ;
4040
41- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
41+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
4242 expect ( result . options . luaTarget ) . toBe ( tstl . LuaTarget . Lua51 ) ;
4343 } ) ;
4444
4545 test ( "should be case-insensitive" , ( ) => {
4646 for ( const value of [ "jit" , "JiT" , "JIT" ] ) {
4747 const result = tstl . parseCommandLine ( [ "--luaTarget" , value ] ) ;
4848
49- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
49+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
5050 expect ( result . options . luaTarget ) . toBe ( tstl . LuaTarget . LuaJIT ) ;
5151 }
5252 } ) ;
5353
5454 test ( "should error on invalid value" , ( ) => {
5555 const result = tstl . parseCommandLine ( [ "--luaTarget" , "invalid" ] ) ;
5656
57- expect ( result . errors ) . toHaveErrorDiagnostics ( ) ;
57+ expect ( result . errors ) . toHaveDiagnostics ( ) ;
5858 } ) ;
5959 } ) ;
6060
6161 describe ( "boolean options" , ( ) => {
6262 test . each ( [ true , false ] ) ( "should parse booleans (%p)" , value => {
6363 const result = tstl . parseCommandLine ( [ "--noHeader" , value . toString ( ) ] ) ;
6464
65- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
65+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
6666 expect ( result . options . noHeader ) . toBe ( value ) ;
6767 } ) ;
6868
6969 test ( "should be case-sensitive" , ( ) => {
7070 const result = tstl . parseCommandLine ( [ "--noHeader" , "FALSE" ] ) ;
7171
72- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
72+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
7373 expect ( result . options . noHeader ) . toBe ( true ) ;
7474 expect ( result . fileNames ) . toEqual ( [ "FALSE" ] ) ;
7575 } ) ;
7676
7777 test ( "should be parsed without a value" , ( ) => {
7878 const result = tstl . parseCommandLine ( [ "--noHeader" ] ) ;
7979
80- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
80+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
8181 expect ( result . options . noHeader ) . toBe ( true ) ;
8282 } ) ;
8383
8484 test ( "shouldn't parse following arguments as values" , ( ) => {
8585 const result = tstl . parseCommandLine ( [ "--noHeader" , "--noHoisting" ] ) ;
8686
87- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
87+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
8888 expect ( result . options . noHeader ) . toBe ( true ) ;
8989 expect ( result . options . noHoisting ) . toBe ( true ) ;
9090 } ) ;
9191
9292 test ( "shouldn't parse following files as values" , ( ) => {
9393 const result = tstl . parseCommandLine ( [ "--noHeader" , "file.ts" ] ) ;
9494
95- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
95+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
9696 expect ( result . options . noHeader ) . toBe ( true ) ;
9797 } ) ;
9898 } ) ;
@@ -121,7 +121,7 @@ describe("command line", () => {
121121 ] ) ( "--%s %s" , ( optionName , value , expected ) => {
122122 const result = tstl . parseCommandLine ( [ `--${ optionName } ` , value ] ) ;
123123
124- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
124+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
125125 expect ( result . options ) . toEqual ( expected ) ;
126126 } ) ;
127127 } ) ;
@@ -146,21 +146,21 @@ describe("tsconfig", () => {
146146 test ( "should allow unknown root-level options" , ( ) => {
147147 const result = parseConfigFileContent ( { unknownOption : true } ) ;
148148
149- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
149+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
150150 expect ( result . options . unknownOption ) . toBeUndefined ( ) ;
151151 } ) ;
152152
153153 test ( "should error on unknown namespaced options" , ( ) => {
154154 const result = parseConfigFileContent ( { tstl : { unknownOption : true } } ) ;
155155
156- expect ( result . errors ) . toHaveErrorDiagnostics ( ) ;
156+ expect ( result . errors ) . toHaveDiagnostics ( ) ;
157157 expect ( result . options . unknownOption ) . toBeUndefined ( ) ;
158158 } ) ;
159159
160160 test ( "should parse options case-sensitively" , ( ) => {
161161 const result = parseConfigFileContent ( { tstl : { NoHeader : true } } ) ;
162162
163- expect ( result . errors ) . toHaveErrorDiagnostics ( ) ;
163+ expect ( result . errors ) . toHaveDiagnostics ( ) ;
164164 expect ( result . options . NoHeader ) . toBeUndefined ( ) ;
165165 expect ( result . options . noHeader ) . toBeUndefined ( ) ;
166166 } ) ;
@@ -169,38 +169,38 @@ describe("tsconfig", () => {
169169 test ( "should parse enums" , ( ) => {
170170 const result = parseConfigFileContent ( { tstl : { luaTarget : "5.1" } } ) ;
171171
172- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
172+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
173173 expect ( result . options . luaTarget ) . toBe ( tstl . LuaTarget . Lua51 ) ;
174174 } ) ;
175175
176176 test ( "should be case-insensitive" , ( ) => {
177177 for ( const value of [ "jit" , "JiT" , "JIT" ] ) {
178178 const result = parseConfigFileContent ( { tstl : { luaTarget : value } } ) ;
179179
180- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
180+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
181181 expect ( result . options . luaTarget ) . toBe ( tstl . LuaTarget . LuaJIT ) ;
182182 }
183183 } ) ;
184184
185185 test ( "should error on invalid value" , ( ) => {
186186 const result = parseConfigFileContent ( { tstl : { luaTarget : "invalid" } } ) ;
187187
188- expect ( result . errors ) . toHaveErrorDiagnostics ( ) ;
188+ expect ( result . errors ) . toHaveDiagnostics ( ) ;
189189 } ) ;
190190 } ) ;
191191
192192 describe ( "boolean options" , ( ) => {
193193 test . each ( [ true , false ] ) ( "should parse booleans (%p)" , value => {
194194 const result = parseConfigFileContent ( { tstl : { noHeader : value } } ) ;
195195
196- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
196+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
197197 expect ( result . options . noHeader ) . toBe ( value ) ;
198198 } ) ;
199199
200200 test ( "shouldn't parse strings" , ( ) => {
201201 const result = parseConfigFileContent ( { tstl : { noHeader : "true" } } ) ;
202202
203- expect ( result . errors ) . toHaveErrorDiagnostics ( ) ;
203+ expect ( result . errors ) . toHaveDiagnostics ( ) ;
204204 expect ( result . options . noHeader ) . toBeUndefined ( ) ;
205205 } ) ;
206206 } ) ;
@@ -229,7 +229,7 @@ describe("tsconfig", () => {
229229 ] ) ( "{ %p: %p }" , ( optionName , value , expected ) => {
230230 const result = parseConfigFileContent ( { tstl : { [ optionName ] : value } } ) ;
231231
232- expect ( result . errors ) . not . toHaveErrorDiagnostics ( ) ;
232+ expect ( result . errors ) . not . toHaveDiagnostics ( ) ;
233233 expect ( result . options ) . toEqual ( expected ) ;
234234 } ) ;
235235 } ) ;
0 commit comments