- npm int(run this command in your project folder)
- npm install selenium-webdriver
- npm install mocha
- npm install chai
- npm install chromedriver --chromedriver_version=LATEST
- open package.json and edit this line "scripts": { "test": "echo "Error: no test specified" && exit 1" }
to this:
"scripts": { "test": "mocha" }
- for run file run this command: npm test
- Command to install packages - npm i --save-dev supertest mocha chai @babel/cli @babel/core @babel/node @babel/register @babel/preset-env
- you should create .mocharc.yaml and put this line in it: require: '@babel/register'
- you should create .babelrc and put this line in it: { "presets": ["@babel/preset-env"] }