From 69a585f47445714afebccb901bda18de55064f43 Mon Sep 17 00:00:00 2001 From: Jeremy Press Date: Mon, 28 Aug 2017 12:57:00 -0700 Subject: [PATCH] Chore: Automate simple server to make running functional tests easier (#334) --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b3c3d5ff2..565bcc9ca 100644 --- a/package.json +++ b/package.json @@ -102,12 +102,13 @@ "build": "yarn run clean && yarn run build-rb && yarn run lint && yarn run dev", "build-ci": "./node_modules/.bin/webpack --progress --colors --config build/webpack.config.js", "build-rb": "mojito-rb-gen -s src/i18n -o src/i18n/json -b en-US.properties", - "ci": "yarn run clean && yarn run build-rb && yarn run lint && yarn run test && yarn run build-ci && yarn run functional-tests", + "ci": "yarn run clean && yarn run build-rb && yarn run lint && yarn run test && yarn run build-ci && yarn run functional-tests-ci", "clean": "rm -rf dist && rm -rf reports/coverage && rm -rf src/i18n/json", "commitmsg": "conventional-changelog-lint -e", "debug": "NODE_ENV=test ./node_modules/.bin/karma start build/karma.conf.js --no-single-run --auto-watch", "dev": "BABEL_ENV=dev NODE_ENV=dev ./node_modules/.bin/webpack --progress --colors --config build/webpack.config.js", - "functional-tests": "node ./node_modules/mocha/bin/mocha ./functional-tests/ --timeout 10000", + "functional-tests": "python -m SimpleHTTPServer 8000 & node ./node_modules/mocha/bin/mocha --recursive ./functional-tests/ --timeout 10000 ; killall python -m SimpleHTTPServer 8000", + "functional-tests-ci": "node ./node_modules/mocha/bin/mocha ./functional-tests/ --timeout 10000", "lint": "NODE_ENV=dev ./node_modules/.bin/eslint src/lib && ./node_modules/.bin/stylelint 'src/lib/**/*.scss'", "precommit": "lint-staged", "prepush": "yarn run lint",