File tree 3 files changed +29
-2
lines changed 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "version" : " 0.2.0" ,
3
+ "configurations" : [{
4
+ "name" : " Debug tests" ,
5
+ "type" : " node" ,
6
+ "request" : " launch" ,
7
+ "protocol" : " auto" ,
8
+ "stopOnEntry" : false ,
9
+ "console" : " integratedTerminal" ,
10
+ "args" : [
11
+ " node_modules/.bin/jest" ,
12
+ " --no-cache" ,
13
+ " --runInBand" ,
14
+ " --env=node-debug" ,
15
+ " --config=jest.config.json"
16
+ ],
17
+ "skipFiles" : [
18
+ " <node_internals>/**/*.js" ,
19
+ " ${workspaceRoot}/node_modules/**/*.js"
20
+ ]
21
+ }]
22
+ }
Original file line number Diff line number Diff line change 45
45
"@types/jest" : " ^19.2.2" ,
46
46
"dts-bundle" : " ^0.7.2" ,
47
47
"jest" : " ^19.0.2" ,
48
+ "jest-environment-node-debug" : " ^2.0.0" ,
48
49
"pascal-case" : " ^2.0.0" ,
49
50
"rimraf" : " ^2.6.1" ,
50
51
"rollup" : " ^0.41.6" ,
Original file line number Diff line number Diff line change 1
- import { HelloWorld } from '..' ;
1
+ import { HelloWorld , doSomethingAsync } from '..' ;
2
2
import * as utils from '../utils' ;
3
3
4
4
test ( 'hello world' , ( ) => {
5
5
const thing = new HelloWorld ( 'neat' ) ;
6
-
7
6
expect ( thing . getMessage ( ) ) . toBe ( 'Hello, this is neat' ) ;
8
7
} ) ;
9
8
10
9
test ( 'utils' , ( ) => {
11
10
expect ( utils . add ( 1 , 4 ) ) . toBe ( 5 ) ;
12
11
} ) ;
12
+
13
+ test ( 'async' , async ( ) => {
14
+ const result = await doSomethingAsync ( ) ;
15
+ expect ( result ) . toBe ( 'hello' ) ;
16
+ } ) ;
You can’t perform that action at this time.
0 commit comments