Browse Source

Fix tests

master
Jake Howard 5 years ago
parent
commit
71de1caf19
  1. 2
      .gitignore
  2. 2
      lib/index.js
  3. 5
      package.json
  4. 4
      scripts/runtests

2
.gitignore

@ -31,3 +31,5 @@ node_modules
# Optional REPL history
.node_repl_history
tests/out

2
lib/index.js

@ -6,6 +6,6 @@ const OPTIONS = {
};
module.exports = transformTools.makeStringTransform('jsfuckify', OPTIONS, function (content, transformOptions, done) {
let newContent = transformer(content, transformOptions.config);
var newContent = transformer(content, transformOptions.config);
done(null, newContent);
});

5
package.json

@ -4,10 +4,13 @@
"description": "",
"main": "lib/index.js",
"scripts": {
"postinstall": "npm run create-dirs",
"create-dirs": "mkdir -p bin/ tests/out",
"build-cli": "browserify ./lib/cli.js -o ./bin/cli.js",
"test": "./scripts/runtests",
"lint": "eslint 'lib/'",
"coverage": "istanbul cover node_modules/.bin/_mocha -- --require scripts/test-helper.js --bail --recursive 'tests/**/*.js'",
"test-build": "browserify tests/build-test.js -t ./lib/index.js -o tests/out/build-test.js",
"coverage": "istanbul cover node_modules/.bin/_mocha -- --require scripts/test-helper.js --bail --recursive 'tests/*.js'",
"mocha": "mocha --require scripts/test-helper.js --bail 'tests/**/*.js'"
},
"bin": "./bin/cli.js",

4
scripts/runtests

@ -6,8 +6,8 @@ echo ">> Linting..."
eslint 'lib/'
echo ">> Testing Build..."
browserify ./test/test.js -t ./lib/index.js -o ./test/out.js
# echo ">> Testing Build..."
# npm run test-build
echo ">> Testing Project..."
npm run coverage
Loading…
Cancel
Save