diff --git a/.eslintrc.js b/.eslintrc.js index a8e2c7c..b239357 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,7 +2,8 @@ module.exports = { root: true, env: { browser: true, - node: true + node: true, + 'cypress/globals': true }, parserOptions: { parser: 'babel-eslint', @@ -19,7 +20,7 @@ module.exports = { 'plugin:nuxt/recommended' ], // required to lint *.vue files - plugins: ['prettier'], + plugins: ['prettier', 'cypress'], rules: { semi: [2, 'never'], 'no-console': 'warn', @@ -38,7 +39,8 @@ module.exports = { 'error', { singleQuote: true, - semi: false + semi: false, + endOfLine:"auto" } ], } diff --git a/.gitignore b/.gitignore index d006bcb..fc3f277 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ dist netlify-lambda-build .env + +.DS_store diff --git a/README.md b/README.md index 1f33ad1..85d8ba2 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,20 @@ $ netlify dev # Generate static project $ yarn generate ``` + +## Running Tests +You need to first start the app and the functions before running the tests. + +``` bash +# Build lambda functions locally +$ yarn netlify-lambda build netlify-lambda-src + +# Serve lambda functions locally +$ yarn netlify-lambda serve netlify-lambda-src + +# Serve nuxt app with hot reload at localhost:3000 +$ yarn dev + +# Run tests +$ yarn test +``` \ No newline at end of file diff --git a/components/Example1.vue b/components/Example1.vue index 64f03ea..43890f4 100644 --- a/components/Example1.vue +++ b/components/Example1.vue @@ -25,7 +25,9 @@ export default {