Skip to content

Commit

Permalink
closed #51 - try parallelshell
Browse files Browse the repository at this point in the history
  • Loading branch information
Eoksni committed Jun 8, 2017
1 parent 93acac3 commit 4167d19
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,25 @@ npm run dev
*Warn*: Don't forget to `vagrant ssh`

```bat
npm run test:unit
npm run test-unit
```

*Notice*: It doesn't build the project, it builds only tests.

To watch on the unit-test:

```bat
npm run test-unit:watch
```

### Run e2e tests

*Warn*: Don't forget to `vagrant ssh`

*Notice*: First start will take quite a bit of time because it downloads selenium and chrome driver.

```bat
npm run test:e2e
npm run test-e2e
```

*Notice*: It doesn't build the project
Expand Down
11 changes: 3 additions & 8 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,12 @@ Vagrant.configure("2") do |config|
npm install
echo "Cleaning dist"
npm run clean
npm run clean -s
mkdir logs 2>/dev/null
echo "Starting watch on app build"
npm run watch > logs/watch.log 2>&1 &
echo "Starting test web server"
npm run dev > logs/ws.log 2>&1 &
echo "Starting proper web server (not implemented yet)"
echo "Starting watch on everything"
npm run watch -s > logs/watch.log 2>&1 &
echo "Starting virtual graphics server"
Xvfb :99 -screen 0 1920x1080x8 -nolisten tcp > logs/xvfb.log 2>&1 &
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"less-loader": "^3.0.0",
"local-web-server": "^1.2.7",
"null-loader": "^0.1.1",
"parallelshell": "^2.0.0",
"rimraf": "^2.6.1",
"url-loader": "^0.5.8",
"vue-loader": "^11.1.4",
Expand All @@ -54,9 +55,11 @@
"scripts": {
"dev": "cd frontend && cd server-mocks && ws",
"build": "cd frontend && webpack --config vendor.webpack.config.js && webpack",
"watch": "cd frontend && webpack --config vendor.webpack.config.js && webpack-runner --config=webpack.config.js --watch",
"build:watch": "cd frontend && webpack --config vendor.webpack.config.js && webpack-runner --config=webpack.config.js --watch",
"watch": "parallelshell 'npm run dev -s' 'npm run build:watch -s'",
"test-unit": "cd frontend && webpack --config test.webpack.config && karma start",
"test-unit:watch": "cd frontend && karma start --single-run=false --auto-watch",
"test-unit:watch": "npm run test-unit && parallelshell 'npm run test-unit:watch-build -s' 'npm run test-unit:watch-run -s'",
"test-unit:watch-run": "cd frontend && karma start --single-run=false --auto-watch",
"test-unit:watch-build": "cd frontend && webpack-runner --config=test.webpack.config.js --watch",
"test-e2e": "cd e2e && wdio",
"test": "npm run test-unit && npm run test-e2e",
Expand Down

0 comments on commit 4167d19

Please sign in to comment.