File tree Expand file tree Collapse file tree 5 files changed +1996
-2039
lines changed Expand file tree Collapse file tree 5 files changed +1996
-2039
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "presets" : [
3
+ [" env" , {
4
+ "targets:" : { "node" : " stable" }
5
+ }]
6
+ ]
7
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 18
18
},
19
19
"main" : " src/laravel-vue-pagination.js" ,
20
20
"scripts" : {
21
- "test" : " karma start karma.conf.js" ,
22
- "test-watch" : " karma start karma.conf.js --no-single-run"
21
+ "test" : " jest"
23
22
},
24
23
"devDependencies" : {
25
- "aliasify" : " ^2.1.0" ,
26
- "babel-preset-es2015" : " ^6.18.0" ,
27
- "babelify" : " ^7.3.0" ,
28
- "browserify" : " ^13.3.0" ,
29
- "jasmine-core" : " ^2.5.2" ,
30
- "karma" : " ^1.3.0" ,
31
- "karma-browserify" : " ^5.1.0" ,
32
- "karma-jasmine" : " ^1.1.0" ,
33
- "karma-phantomjs-launcher" : " ^1.0.2" ,
34
- "karma-spec-reporter" : " ^0.0.26" ,
35
- "phantomjs-prebuilt" : " ^2.1.14" ,
36
- "vue" : " ^2.1.8" ,
37
- "watchify" : " ^3.8.0"
24
+ "babel-jest" : " ^21.2.0" ,
25
+ "babel-preset-env" : " ^1.6.0" ,
26
+ "jest" : " ^21.2.1" ,
27
+ "regenerator-runtime" : " ^0.11.0" ,
28
+ "vue" : " ^2.4.4" ,
29
+ "vue-template-compiler" : " ^2.4.4" ,
30
+ "vue-test-utils" : " 1.0.0-beta"
31
+ },
32
+ "jest" : {
33
+ "testMatch" : [" **/tests/**/*.js?(x)" ]
38
34
}
39
35
}
Original file line number Diff line number Diff line change 1
- const Vue = require ( 'vue' ) ;
2
- const LaravelVuePagination = require ( '../src/laravel-vue-pagination' ) ;
1
+ import { mount } from 'vue-test-utils' ;
2
+ import LaravelVuePagination from '../src/laravel-vue-pagination' ;
3
3
4
4
function getComponent ( Component , propsData ) {
5
- const Ctor = Vue . extend ( Component ) ;
6
- return new Ctor ( { propsData } ) . $mount ( ) ;
5
+ const wrapper = mount ( Component , { propsData : propsData } ) ;
6
+ return wrapper . vm ;
7
7
}
8
8
9
9
var exampleData = {
You can’t perform that action at this time.
0 commit comments