Web client for cookbook
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
To run the end-to-end (E2E) tests locally, follow these steps:
-
Node.js: Ensure that you have Node.js installed on your machine. You can download it from the official website: https://nodejs.org/
-
Dependencies: Install project dependencies by running the following command in your terminal at the root of the project:
npm install
-
Configuration: Make sure you have properly configured Nightwatch.js for your project. Check the
nightwatch.conf.js
file in the root directory. -
Run Tests: Execute the E2E tests using the following command:
npm run test
-
Run Tests: Execute the E2E tests with coverage using the following command:
npm run test:e2e:coverage
If you're interested in viewing code coverage for the tests, follow these steps:
-
Install Istanbul/NYC: Install the necessary packages by running:
npm install nyc --save-dev
For detailed explanation on how things work, checkout the guide and docs for vue-loader.
- To install dependencies as described above, since the packages are already in the packagae.json file, simply delete the package-lock file first then update the npm version in the package.json file to 5.10.0 (DO NOT COMMIT THIS CHANGE)
- Now run
npm i --force
- Finally to run the tests,
- You need to use node version 16.10.0, you can swicth to this version with nvm
- Open a new terminal and run
npm run dev
- In another terminal,
npm run e2e