File tree Expand file tree Collapse file tree 4 files changed +2387
-165
lines changed Expand file tree Collapse file tree 4 files changed +2387
-165
lines changed Original file line number Diff line number Diff line change 8
8
cache : yarn
9
9
10
10
script :
11
- - yarn test
11
+ - yarn test --coverage
Original file line number Diff line number Diff line change 4
4
"babel-preset-env" : " ^1.2.2" ,
5
5
"babel-preset-latest" : " ^6.24.0" ,
6
6
"babel-register" : " ^6.22.0" ,
7
- "chai" : " ^3.5.0" ,
8
- "mocha" : " ^3.2.0"
7
+ "jest" : " ^21.0.0"
9
8
},
10
9
"name" : " babel-plugin-debug-macros" ,
11
10
"version" : " 0.1.11" ,
20
19
"url" : " https://github.com/chadhietala/babel-debug-macros"
21
20
},
22
21
"scripts" : {
23
- "test" : " mocha src/tests/**-test.js "
22
+ "test" : " jest "
24
23
},
25
24
"keywords" : [
26
25
" babel" ,
34
33
"license" : " MIT" ,
35
34
"dependencies" : {
36
35
"semver" : " ^5.3.0"
36
+ },
37
+ "jest" : {
38
+ "testMatch" : [
39
+ " <rootDir>/src/tests/**/*-test.js"
40
+ ]
37
41
}
38
42
}
Original file line number Diff line number Diff line change 2
2
3
3
const DebugToolsPlugin = require ( '../index' ) ;
4
4
const transform = require ( 'babel-core' ) . transform ;
5
- const expect = require ( 'chai' ) . expect ;
6
5
const fs = require ( 'fs' ) ;
7
6
8
7
const presets = [ [ "latest" , {
@@ -422,14 +421,14 @@ function transformTestHelper(options) {
422
421
it ( fixtureName , function ( ) {
423
422
let sample = fs . readFileSync ( `./fixtures/${ fixtureName } /sample.js` , 'utf-8' ) ;
424
423
let expectation = fs . readFileSync ( `./fixtures/${ fixtureName } /expectation.js` , 'utf-8' ) ;
425
- expect ( transform ( sample , options ) . code ) . to . equal ( expectation ) ;
424
+ expect ( transform ( sample , options ) . code ) . toEqual ( expectation ) ;
426
425
} ) ;
427
426
} ,
428
427
429
428
generateErrorTest ( fixtureName , error ) {
430
429
it ( fixtureName , function ( ) {
431
430
let sample = fs . readFileSync ( `./fixtures/${ fixtureName } /sample.js` , 'utf-8' ) ;
432
- expect ( ( ) => transform ( sample , options ) ) . to . throw ( error ) ;
431
+ expect ( ( ) => transform ( sample , options ) ) . toThrow ( error ) ;
433
432
} ) ;
434
433
} ,
435
434
} ;
You can’t perform that action at this time.
0 commit comments