For my initial test with percy snapshot, I used the command below:
npm run test:percy
Unfortunately, an error message appeared when running the command:
xxx.xxx@LPG002572 TC-Visual % npm run test:percy
npm ERR! missing script: test:percy
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xxx.xxx/.npm/_logs/2020-04-06T16_11_45_122Z-debug.log
jacqueline.george@LPG002572 TC-Visual % npm run test:percy
npm ERR! missing script: test:percy
I double-checked my package.json
and it seems to be correct. What mistake did I make and how can I resolve this issue?
{
"name": "tc-visual",
"version": "1.0.0",
"description": "Visual testing with TestCafe and Percy.io",
"main": "index.js",
"scripts": {
"test": "percy exec -- testcafe chrome ./tests"
},
"keywords": [
"TestCafe",
"percy"
],
"author": "xxx xxx",
"license": "ISC",
"dependencies": {
"@percy/testcafe": "^0.2.0",
"testcafe": "^1.8.3"
}
}