This repository was archived by the owner on Jun 1, 2023. It is now read-only.
File tree 4 files changed +30
-12
lines changed
4 files changed +30
-12
lines changed Original file line number Diff line number Diff line change 9
9
"start" : " node build/dev-server.js" ,
10
10
"build" : " cross-env FULL_BUNDLE=false webpack --progress --config webpack.build.config.js" ,
11
11
"unit" : " cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run" ,
12
+ "unit:watch" : " cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --watch" ,
12
13
"e2e" : " node test/e2e/runner.js" ,
13
14
"test" : " npm run unit && npm run e2e" ,
14
15
"lint" : " eslint --ext .js,.vue src test/unit/specs test/e2e/specs"
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ testsContext.keys().forEach(testsContext)
9
9
// require all src files except main.js for coverage.
10
10
// you can also change this to match only the subset of files that
11
11
// you want coverage for.
12
- const srcContext = require . context ( '../../src' , true , / ^ \. \/ (? ! m a i n ( \. j s ) ? $ ) / )
12
+ const srcContext = require . context ( '../../src' , true , / ^ \. \/ (? ! m a i n \. j s $ ) . + \. ( j s | v u e ) $ / i )
13
13
srcContext . keys ( ) . forEach ( srcContext )
Original file line number Diff line number Diff line change
1
+ import Vue from 'vue'
2
+ import VueFormWizard from './../../../src/components/FormWizard.vue'
3
+ import TabContent from './../../../src/components/TabContent.vue'
4
+
5
+ function init ( ) {
6
+ Vue . component ( 'form-wizard' , VueFormWizard )
7
+ Vue . component ( 'tab-content' , TabContent )
8
+ }
9
+
10
+ describe ( 'FormWizard.vue' , ( ) => {
11
+ beforeEach ( ( ) => {
12
+ init ( )
13
+ } )
14
+ it ( 'should render correct contents' , ( done ) => {
15
+ const vm = new Vue ( {
16
+ template : `<form-wizard ref="wizard">
17
+ <tab-content>First</tab-content>
18
+ <tab-content>Second</tab-content>
19
+ </form-wizard>`
20
+ } ) . $mount ( )
21
+
22
+ let wizard = vm . $children [ 0 ]
23
+ let wizardComp = vm . $refs . wizard
24
+ expect ( wizard . $children . length ) . to . equal ( 2 )
25
+ expect ( wizardComp . activeTabIndex ) . to . equal ( 0 )
26
+ done ( )
27
+ } )
28
+ } )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments