Ver Fonte

node 0.12 tests fail fix

sanex3339 há 8 anos atrás
pai
commit
6f10d531e3
6 ficheiros alterados com 28 adições e 10 exclusões
  1. 1 0
      .travis.yml
  2. 1 1
      scripts/test-coveralls
  3. 1 1
      scripts/test-full
  4. 1 1
      scripts/test-mocha
  5. 0 7
      test/config/config.spec.ts
  6. 24 0
      test/index.spec.ts

+ 1 - 0
.travis.yml

@@ -5,6 +5,7 @@ node_js:
   - "0.12"
   - iojs
   - "4"
+  - "6"
   - "stable"
 
 script: "npm run travis"

+ 1 - 1
scripts/test-coveralls

@@ -1,6 +1,6 @@
 #!/bin/bash
 
 npm run test:compile
-$(npm bin)/istanbul cover $(npm bin)/_mocha -- $(find test-tmp/test -name '*.spec.js') --report lcovonly
+$(npm bin)/istanbul cover $(npm bin)/_mocha -- test-tmp/test/index.spec.js --report lcovonly
 cat ./coverage/lcov.info | $(npm bin)/coveralls
 npm run test:removeTmpDir

+ 1 - 1
scripts/test-full

@@ -2,5 +2,5 @@
 
 npm run test:compile
 node test-tmp/test/dev/test.js
-$(npm bin)/istanbul cover $(npm bin)/_mocha -- $(find test-tmp/test -name '*.spec.js')
+$(npm bin)/istanbul cover $(npm bin)/_mocha -- test-tmp/test/index.spec.js
 npm run test:removeTmpDir

+ 1 - 1
scripts/test-mocha

@@ -1,5 +1,5 @@
 #!/bin/bash
 
 npm run test:compile
-$(npm bin)/mocha $(find test-tmp/test -name '*.spec.js')
+$(npm bin)/mocha test-tmp/test/index.spec.js
 npm run test:removeTmpDir

+ 0 - 7
test/config/config.spec.ts

@@ -1,7 +0,0 @@
-import { BabelPolyfill } from '../polyfills/BabelPolyfill';
-
-require('source-map-support').install();
-
-before(() => {
-    BabelPolyfill.append();
-});

+ 24 - 0
test/index.spec.ts

@@ -0,0 +1,24 @@
+import { BabelPolyfill } from './polyfills/BabelPolyfill';
+
+require('source-map-support').install();
+
+BabelPolyfill.append();
+
+/**
+ * Unit tests
+ */
+import './unit-tests/NodeUtils.spec';
+import './unit-tests/ObfuscationResult.spec';
+import './unit-tests/OptionsNormalizer.spec';
+import './unit-tests/Utils.spec';
+import './unit-tests/cli/CLIUtils.spec';
+import './unit-tests/node-obfuscators/CatchClauseObfuscator.spec';
+import './unit-tests/node-obfuscators/FunctionDeclarationObfuscator.spec';
+import './unit-tests/node-obfuscators/FunctionObfuscator.spec';
+
+/**
+ * Functional tests
+ */
+import './functional-tests/JavaScriptObfuscator.spec';
+import './functional-tests/JavaScriptObfuscatorCLI.spec';
+import './functional-tests/JavaScriptObfuscatorInternal.spec';