Skip to content

Commit c88f920

Browse files
committed
Run tests in a single command
1 parent 0ae169b commit c88f920

File tree

3 files changed

+1788
-2685
lines changed

3 files changed

+1788
-2685
lines changed

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,9 @@ $ yarn generate
3636
```
3737

3838
## Running Tests
39-
You need to first start the app and the functions before running the tests.
39+
Tests use the Netlify CLI to run the serverless functions locally. You'll probably be prompted to login with your Netlify account.
4040

4141
``` bash
42-
# Build lambda functions locally
43-
$ yarn netlify-lambda build netlify-lambda-src
44-
45-
# Serve lambda functions locally
46-
$ yarn netlify-lambda serve netlify-lambda-src
47-
48-
# Serve nuxt app with hot reload at localhost:3000
49-
$ yarn dev
50-
5142
# Run tests
5243
$ yarn test
5344
```

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"dev": "nuxt",
99
"build": "nuxt build",
1010
"start": "nuxt start",
11-
"test": "cypress open",
11+
"test": "ntl dev & wait-on http://localhost:3000 & cypress run",
12+
"testing": "cypress run",
1213
"generate": "nuxt generate",
1314
"lint": "sass-lint -c .sass-lint.yml '**/*.scss' -v -q -i 'node_modules/**/*.scss' && eslint --ext .js,.vue --ignore-path .gitignore ."
1415
},
@@ -32,10 +33,11 @@
3233
"eslint-plugin-cypress": "^2.8.1",
3334
"eslint-plugin-nuxt": ">=0.4.2",
3435
"eslint-plugin-prettier": "^3.0.1",
35-
"netlify-cli": "^2.25.0",
36+
"netlify-cli": "2.11.13",
3637
"node-sass": "^4.11.0",
3738
"prettier": "^1.16.4",
3839
"sass-lint": "^1.12.1",
39-
"sass-loader": "^7.1.0"
40+
"sass-loader": "^7.1.0",
41+
"wait-on": "^3.3.0"
4042
}
4143
}

0 commit comments

Comments
 (0)