File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 1
- import { describe , it , expect } from '@jest/globals' ;
1
+ import { describe , it , beforeEach , expect } from '@jest/globals' ;
2
+ import { UserError , ErrorCode } from '../../src/exceptions' ;
3
+ import { PyScriptApp } from '../../src/main' ;
2
4
3
- describe ( 'Placeholder' , ( ) => {
4
- it ( 'this is a placeholder, we need to fix and re-enable the commented out tests' , ( ) => {
5
- expect ( true ) . toBe ( true ) ;
6
- } ) ;
7
- } ) ;
8
-
9
- /*
10
5
describe ( 'Test withUserErrorHandler' , ( ) => {
11
6
class MyApp extends PyScriptApp {
12
7
myRealMain : any ;
@@ -17,7 +12,7 @@ describe('Test withUserErrorHandler', () => {
17
12
}
18
13
19
14
async _realMain ( ) {
20
- await this.myRealMain();
15
+ this . myRealMain( ) ;
21
16
}
22
17
}
23
18
@@ -68,8 +63,6 @@ describe('Test withUserErrorHandler', () => {
68
63
}
69
64
70
65
const app = new MyApp ( myRealMain ) ;
71
- expect.assertions(1);
72
- await expect(async () => await app.main()).resolves.toThrow(new Error('Explosions!'));
66
+ expect ( app . main ( ) ) . rejects . toThrow ( new Error ( 'Explosions!' ) ) ;
73
67
} ) ;
74
68
} ) ;
75
- */
You can’t perform that action at this time.
0 commit comments