From 098df6d4adb7fbc3701dbb5f1b60d7829099444a Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Sun, 10 Feb 2019 16:00:37 +0000 Subject: [PATCH] test: enable browser tests in node 10 --- package.json | 2 +- scripts/prepare-tests | 5 ++++- ...8_code_clean-up not.spec.js => 388_code_clean-up.spec.js} | 0 3 files changed, 5 insertions(+), 2 deletions(-) rename spec/issues/{388_code_clean-up not.spec.js => 388_code_clean-up.spec.js} (100%) diff --git a/package.json b/package.json index 2abe4fe..3548a66 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/scripts/prepare-tests b/scripts/prepare-tests index 6f62634..6847033 100755 --- a/scripts/prepare-tests +++ b/scripts/prepare-tests @@ -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/");' diff --git a/spec/issues/388_code_clean-up not.spec.js b/spec/issues/388_code_clean-up.spec.js similarity index 100% rename from spec/issues/388_code_clean-up not.spec.js rename to spec/issues/388_code_clean-up.spec.js