test: enable browser tests in node 10

master
Evgeny Poberezkin 2019-02-10 16:00:37 +00:00
parent 8720547e6e
commit 098df6d4ad
3 changed files with 5 additions and 2 deletions

View File

@ -24,7 +24,7 @@
"build": "del-cli lib/dotjs/*.js '!lib/dotjs/index.js' && node scripts/compile-dots.js",
"test-karma": "karma start",
"test-browser": "del-cli .browser && npm run bundle && scripts/prepare-tests && npm run test-karma",
"test": "npm run jshint && npm run eslint && npm run test-ts && npm run build && npm run test-cov",
"test": "npm run jshint && npm run eslint && npm run test-ts && npm run build && npm run test-cov && if-node-version 10 npm run test-browser",
"prepublish": "npm run build && npm run bundle",
"watch": "watch 'npm run build' ./lib/dot"
},

View File

@ -4,6 +4,9 @@ set -e
mkdir -p .browser
echo
echo Preparing browser tests:
find spec -type f -name '*.spec.js' | \
xargs -I {} sh -c \
'export f="{}"; browserify $f -t require-globify -t brfs -x ajv -u buffer -o $(echo $f | sed -e "s/spec/.browser/");'
'export f="{}"; echo $f; browserify $f -t require-globify -t brfs -x ajv -u buffer -o $(echo $f | sed -e "s/spec/.browser/");'