Просмотр исходного кода

build: move test config files into /test

Evan You 8 лет назад
Родитель
Сommit
610d1aabe9

+ 0 - 5
build/.eslintrc

@@ -1,5 +0,0 @@
-{
-  "rules": {
-    "camelcase": 0
-  }
-}

+ 4 - 4
package.json

@@ -15,7 +15,7 @@
     "dev": "rollup -w -c build/config.js --environment TARGET:web-full-dev",
     "dev:cjs": "rollup -w -c build/config.js --environment TARGET:web-runtime-cjs",
     "dev:esm": "rollup -w -c build/config.js --environment TARGET:web-runtime-esm",
-    "dev:test": "karma start build/karma.dev.config.js",
+    "dev:test": "karma start test/unit/karma.dev.config.js",
     "dev:ssr": "rollup -w -c build/config.js --environment TARGET:web-server-renderer",
     "dev:compiler": "rollup -w -c build/config.js --environment TARGET:web-compiler ",
     "dev:weex": "rollup -w -c build/config.js --environment TARGET:weex-framework ",
@@ -24,8 +24,8 @@
     "build:ssr": "npm run build -- vue.runtime.common.js,vue-server-renderer",
     "build:weex": "npm run build -- weex-vue-framework,weex-template-compiler",
     "test": "npm run lint && flow check && npm run test:types && npm run test:cover && npm run test:e2e -- --env phantomjs && npm run test:ssr && npm run test:weex",
-    "test:unit": "karma start build/karma.unit.config.js",
-    "test:cover": "karma start build/karma.cover.config.js",
+    "test:unit": "karma start test/unit/karma.unit.config.js",
+    "test:cover": "karma start test/unit/karma.cover.config.js",
     "test:e2e": "npm run build -- vue.min.js && node test/e2e/runner.js",
     "test:weex": "npm run build:weex && jasmine JASMINE_CONFIG_PATH=test/weex/jasmine.json",
     "test:ssr": "npm run build:ssr && jasmine JASMINE_CONFIG_PATH=test/ssr/jasmine.json",
@@ -33,7 +33,7 @@
     "test:types": "tsc -p ./types/test/tsconfig.json",
     "lint": "eslint src build test",
     "flow": "flow check",
-    "sauce": "karma start build/karma.sauce.config.js",
+    "sauce": "karma start test/unit/karma.sauce.config.js",
     "bench:ssr": "npm run build:ssr && node benchmarks/ssr/renderToString.js && node benchmarks/ssr/renderToStream.js",
     "release": "bash build/release.sh",
     "release:weex": "bash build/release-weex.sh",

+ 0 - 0
build/nightwatch.config.js → test/e2e/nightwatch.config.js


+ 1 - 1
test/e2e/runner.js

@@ -9,7 +9,7 @@ server.listen(8080)
 
 var args = process.argv.slice(2)
 if (args.indexOf('--config') === -1) {
-  args = args.concat(['--config', 'build/nightwatch.config.js'])
+  args = args.concat(['--config', 'test/e2e/nightwatch.config.js'])
 }
 if (args.indexOf('--env') === -1) {
   args = args.concat(['--env', 'chrome,phantomjs'])

+ 3 - 3
build/karma.base.config.js → test/unit/karma.base.config.js

@@ -1,4 +1,4 @@
-var alias = require('./alias')
+var alias = require('../../build/alias')
 var webpack = require('webpack')
 
 var webpackConfig = {
@@ -31,10 +31,10 @@ var webpackConfig = {
 module.exports = {
   frameworks: ['jasmine'],
   files: [
-    '../test/unit/index.js'
+    './index.js'
   ],
   preprocessors: {
-    '../test/unit/index.js': ['webpack', 'sourcemap']
+    './index.js': ['webpack', 'sourcemap']
   },
   webpack: webpackConfig,
   webpackMiddleware: {

+ 2 - 2
build/karma.cover.config.js → test/unit/karma.cover.config.js

@@ -6,8 +6,8 @@ module.exports = function (config) {
     reporters: ['mocha', 'coverage'],
     coverageReporter: {
       reporters: [
-        { type: 'lcov', dir: '../coverage', subdir: '.' },
-        { type: 'text-summary', dir: '../coverage', subdir: '.' }
+        { type: 'lcov', dir: '../../coverage', subdir: '.' },
+        { type: 'text-summary', dir: '../../coverage', subdir: '.' }
       ]
     },
     singleRun: true,

+ 0 - 0
build/karma.dev.config.js → test/unit/karma.dev.config.js


+ 0 - 0
build/karma.sauce.config.js → test/unit/karma.sauce.config.js


+ 0 - 0
build/karma.unit.config.js → test/unit/karma.unit.config.js