mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-27 07:58:45 +03:00
Modify test scripts
This commit is contained in:
parent
a519d2b879
commit
df9144b493
@ -165,8 +165,12 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "./script/build-dist.sh && ./script/build-module.js",
|
"build": "./script/build-dist.sh && ./script/build-module.js",
|
||||||
"fuzz": "npx jazzer ./test/jazzer-fuzz-test.js --sync",
|
"fuzz": "jazzer ./test/jazzer-fuzz-test.js --sync",
|
||||||
"test": "npm run build && ./script/test-all.sh"
|
"test": "./script/test-all.sh",
|
||||||
|
"test:jshint": "jshint src && jshint script",
|
||||||
|
"test:lockfile-lint": "npx lockfile-lint -p package-lock.json",
|
||||||
|
"test:mocha": "mocha -R list test/mocha*js",
|
||||||
|
"test:playwright": "playwright test"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/parser": "7.15.8",
|
"@babel/parser": "7.15.8",
|
||||||
|
@ -1,21 +1,26 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo '
|
||||||
|
- run build
|
||||||
|
'
|
||||||
|
npm run build || exit 1
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
- lint js code
|
- lint js code
|
||||||
'
|
'
|
||||||
jshint src && jshint script || exit 1
|
npm run test:jshint || exit 1
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
- test using mocha
|
- test using mocha
|
||||||
'
|
'
|
||||||
mocha -R list test/mocha*js || exit 1
|
npm run test:mocha || exit 1
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
- test using playwright
|
- test using playwright
|
||||||
'
|
'
|
||||||
npx playwright test || exit 1
|
npm run test:playwright || exit 1
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
- lint lockfile
|
- lint lockfile
|
||||||
'
|
'
|
||||||
npx lockfile-lint -p package-lock.json || exit 1
|
npm run test:lockfile-lint || exit 1
|
Loading…
x
Reference in New Issue
Block a user