Permalink
Browse files

Setup e2e test

  • Loading branch information...
ktsn committed Sep 24, 2016
1 parent 2f4014c commit df5037555f7861b99e7577527b76427f25835e79
@@ -1,5 +1,7 @@
node_modules/
*.log*
/dist/
/.tmp/
/test/log/
/example/__build__.js
@@ -0,0 +1,3 @@
launch = true
app.command = npm run dev
app.port = 8080
@@ -28,7 +28,7 @@
"build:cjs": "rollup -c scripts/rollup.config.js -f cjs -o dist/vue-range-slider.cjs.js",
"build:dev": "cross-env NODE_ENV=development rollup -c scripts/rollup.config.js -f umd -o dist/vue-range-slider.js",
"build:prod": "cross-env NODE_ENV=production rollup -c scripts/rollup.config.js -f umd | uglifyjs -mc warnings=false --comments -o dist/vue-range-slider.min.js",
"build:test": "rollup -c scripts/rollup.config.test.js",
"build:test": "rollup -c scripts/rollup.config.unit.js",
"build:example": "webpack --config scripts/webpack.config.example.js",
"watch:cjs": "cd scripts && rollup -c -f cjs -o ../dist/vue-range-slider.cjs.js -w",
"watch:test": "node scripts/test-dev.js",
@@ -39,6 +39,7 @@
"testem:ci": "testem ci --launch PhantomJS",
"test": "run-p watch:test testem",
"test:ci": "run-s build:test testem:ci",
"test:e2e": "mocha --compilers js:babel-register test/e2e/example.js",
"release": "run-s lint flow test:ci clean build"
},
"devDependencies": {
@@ -50,12 +51,14 @@
"babel-plugin-transform-flow-strip-types": "^6.8.0",
"babel-preset-es2015": "^6.14.0",
"babel-preset-power-assert": "^1.0.0",
"babel-register": "^6.14.0",
"cross-env": "^2.0.0",
"css-loader": "^0.25.0",
"eslint": "^3.0.0",
"eslint-plugin-flowtype": "^2.4.1",
"eslint-plugin-html": "^1.5.2",
"flow-bin": "^0.32.0",
"mocha": "^3.0.2",
"node-sass": "^3.10.0",
"npm-run-all": "^3.0.0",
"power-assert": "^1.3.1",
@@ -72,6 +75,8 @@
"rollup-watch": "^2.5.0",
"style-loader": "^0.13.1",
"testem": "^1.6.0",
"testium-driver-sync": "^2.3.0",
"testium-mocha": "^1.1.0",
"uglifyjs": "^2.4.10",
"vue": "^2.0.0-rc.6",
"vue-loader": "^9.5.0",
@@ -8,7 +8,7 @@ const globals = require('rollup-plugin-node-globals')
const builtins = require('rollup-plugin-node-builtins')
module.exports = {
entry: 'test/**/*.js',
entry: 'test/unit/**/*.js',
dest: '.tmp/test.js',
format: 'iife',
moduleName: 'TEST',
@@ -1,4 +1,4 @@
const config = require('./rollup.config.test')
const config = require('./rollup.config.unit')
const rollup = require('rollup')
const watch = require('rollup-watch')
@@ -0,0 +1,15 @@
const assert = require('power-assert')
const browser = require('testium-mocha').browser
describe('Example', () => {
before(browser.beforeHook())
before('load example page', () => {
browser.navigateTo('/')
browser.assert.httpStatus(200)
})
it('shows the right title', () => {
assert(browser.getPageTitle() === 'vue-range-slider example')
})
})
@@ -1,5 +1,5 @@
import assert from 'power-assert'
import { round } from '../src/utils'
import { round } from '../../src/utils'
describe('utils', () => {
describe('round', () => {

0 comments on commit df50375

Please sign in to comment.