From 63f9b187da2a29a1c19e870afd2b00c430556cb0 Mon Sep 17 00:00:00 2001 From: seanstrom Date: Mon, 5 Jan 2015 09:47:07 -0800 Subject: [PATCH] Add clean script to remove test-browser.js after the tests run Whenever you run `npm test` it would generate a file. The location of the file would be `tests/browser/test-browser.js` which is a directory that the linter will lint. I tried making the linter ignore the file but it seems we're using an older version of the linter which may not support ignoring paths. I may be wrong but this was an alternative solution, safely delete the file before running the linter. --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e58bebdc5..6e4eeccf4 100644 --- a/package.json +++ b/package.json @@ -41,9 +41,10 @@ "isstream": "~0.1.1" }, "scripts": { - "test": "npm run lint && node node_modules/.bin/taper tests/test-*.js && npm run test-browser", + "test": "npm run lint && node node_modules/.bin/taper tests/test-*.js && npm run test-browser && npm run clean", "test-browser": "browserify tests/browser/test.js -o tests/browser/test-browser.js && karma start tests/browser/karma.conf.js", - "lint": "node node_modules/.bin/eslint lib/ *.js tests/ && echo Lint passed." + "lint": "node node_modules/.bin/eslint lib/ *.js tests/ && echo Lint passed.", + "clean": "rm tests/browser/test-browser.js || true" }, "devDependencies": { "browserify": "~5.9.1",