@@ -363,21 +363,11 @@ export abstract class TestBuilder {
363363 return this ;
364364 }
365365
366- public expectToHaveNoErrorDiagnostics ( ) : this {
366+ public expectToHaveNoDiagnostics ( ) : this {
367367 expect ( this . getLuaDiagnostics ( ) ) . not . toHaveDiagnostics ( ) ;
368368 return this ;
369369 }
370370
371- /*public expectExecutionError(message: string): this {
372- const luaResult = this.getLuaExecutionResult();
373- if (!(luaResult instanceof ExecutionError)) {
374- expect(luaResult).toBeInstanceOf(ExecutionError);
375- } else {
376- expect(luaResult.message).toContain(message);
377- }
378- return this;
379- }*/
380-
381371 public expectNoExecutionError ( ) : this {
382372 const luaResult = this . getLuaExecutionResult ( ) ;
383373 if ( luaResult instanceof ExecutionError ) {
@@ -388,7 +378,7 @@ export abstract class TestBuilder {
388378 }
389379
390380 public expectToMatchJsResult ( allowErrors = false ) : this {
391- this . expectToHaveNoErrorDiagnostics ( ) ;
381+ this . expectToHaveNoDiagnostics ( ) ;
392382 if ( ! allowErrors ) this . expectNoExecutionError ( ) ;
393383
394384 const luaResult = this . getLuaExecutionResult ( ) ;
@@ -399,20 +389,20 @@ export abstract class TestBuilder {
399389 }
400390
401391 public expectToEqual ( expected : any ) : this {
402- this . expectToHaveNoErrorDiagnostics ( ) ;
392+ this . expectToHaveNoDiagnostics ( ) ;
403393 const luaResult = this . getLuaExecutionResult ( ) ;
404394 expect ( luaResult ) . toEqual ( expected ) ;
405395 return this ;
406396 }
407397
408398 public expectLuaToMatchSnapshot ( ) : this {
409- this . expectToHaveNoErrorDiagnostics ( ) ;
399+ this . expectToHaveNoDiagnostics ( ) ;
410400 expect ( this . getMainLuaCodeChunk ( ) ) . toMatchSnapshot ( ) ;
411401 return this ;
412402 }
413403
414404 public expectResultToMatchSnapshot ( ) : this {
415- this . expectToHaveNoErrorDiagnostics ( ) ;
405+ this . expectToHaveNoDiagnostics ( ) ;
416406 expect ( this . getLuaExecutionResult ( ) ) . toMatchSnapshot ( ) ;
417407 return this ;
418408 }
0 commit comments