8000 use jasmine for unit tests · vuejs/v2.vuejs.org@94d85b5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 94d85b5

Browse files
committed
use jasmine for unit tests
1 parent ec293df commit 94d85b5

File tree

3 files changed

+137
-132
lines changed

3 files changed

+137
-132
lines changed

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
"chat": "cd examples/chat && webpack-dev-server --inline --hot --config ../webpack.shared.config.js",
1717
"build": "node build/build.js",
1818
"build-examples": "BABEL_ENV=development webpack --config examples/webpack.build-all.config.js",
19-
"unit": "BABEL_ENV=development mocha test/unit/test.js --compilers js:babel-core/register 2>/dev/null",
20-
"pree2e": "npm run build-examples",
21-
"e2e": "casperjs test --concise ./test/e2e",
22-
"test": "eslint src && npm run unit && npm run e2e",
19+
"test": "eslint src && npm run test:unit && npm run test:e2e",
20+
"test:unit": "cross-env BABEL_ENV=development jasmine JASMINE_CONFIG_PATH=test/unit/jasmine.json",
21+
"test:e2e": "npm run build-examples && casperjs test --concise ./test/e2e",
2322
"docs": "cd docs && gitbook serve",
2423
"deploy-docs": "cd docs && ./deploy.sh",
2524
"release": "bash build/release.sh"
@@ -44,19 +43,20 @@
4443
"babel-preset-stage-2": "^6.1.18",
4544
"babel-runtime": "^6.0.0",
4645
"casperjs": "^1.1.0-beta5",
47-
"chai": "^3.4.1",
4846
"css-loader": "^0.23.1",
4947
"eslint": "^2.2.0",
5048
"eslint-config-vue": "^1.0.0",
51-
"mocha": "^2.3.4",
49+
"jasmine": "^2.4.1",
50+
"jasmine-core": "^2.4.1",
51+
"nightwatch": "^0.9.5",
52+
"nightwatch-helpers": "^1.1.0",
5253
"phantomjs-prebuilt": "^2.1.7",
53-
"rollup": "^0.32.0",
54+
"rollup": "^0.34.1",
5455
"rollup-plugin-babel": "^2.4.0",
55-
"sinon": "^1.17.3",
56-
"sinon-chai": "^2.8.0",
56+
"selenium-server": "^2.53.1",
5757
"todomvc-app-css": "^2.0.3",
5858
"uglify-js": "^2.6.2",
59-
"vue": "^2.0.0-alpha.7",
59+
"vue": "^2.0.0-beta.5",
6060
"vue-loader": "^9.0.3",
6161
"webpack": "^1.12.8",
6262
"webpack-dev-server": "^1.12.1"

test/unit/jasmine.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"spec_dir": "test/unit",
3+
"spec_files": [
4+
"test.js"
5+
],
6+
"helpers": [
7+
"../../node_modules/babel-register/lib/node.js"
8+
]
9+
}

0 commit comments

Comments
 (0)
0