Simplified scripts and tests

This commit is contained in:
sanex
2020-10-05 11:23:28 +03:00
parent c459acdcf4
commit c1c0330609
17 changed files with 36 additions and 52 deletions
+1 -1
View File
@@ -2,12 +2,12 @@
.DS_Store
.idea
.nyc_output
coverage
npm-debug.log
*.js.map
/coverage
/node_modules
/test/fixtures/compile-performance-obfuscated.js
/test-tmp
/tmp
/test/benchmark/**/**
*dockerfile
-1
View File
@@ -7,4 +7,3 @@ examples
images
webpack
test
test-tmp
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "@istanbuljs/nyc-config-typescript"
}
-1
View File
@@ -1,4 +1,3 @@
sudo: false
language: node_js
node_js:
+5 -6
View File
@@ -23,7 +23,7 @@
"dependencies": {
"@gradecam/tsenum": "1.2.0",
"@nuxtjs/opencollective": "0.2.2",
"acorn": "8.0.2",
"acorn": "8.0.3",
"chalk": "4.1.0",
"chance": "1.1.7",
"class-validator": "0.12.2",
@@ -45,6 +45,7 @@
"tslib": "2.0.1"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "1.0.1",
"@types/chai": "4.2.12",
"@types/chance": "1.1.0",
"@types/escodegen": "0.0.6",
@@ -58,7 +59,7 @@
"@types/multimatch": "4.0.0",
"@types/node": "14.11.2",
"@types/rimraf": "3.0.0",
"@types/sinon": "9.0.7",
"@types/sinon": "9.0.8",
"@types/string-template": "1.0.2",
"@types/webpack-env": "1.15.3",
"@typescript-eslint/eslint-plugin": "4.3.0",
@@ -68,7 +69,7 @@
"coveralls": "3.1.0",
"eslint": "7.10.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.6.2",
"eslint-plugin-jsdoc": "30.6.3",
"eslint-plugin-no-null": "1.0.2",
"eslint-plugin-prefer-arrow": "1.2.2",
"eslint-plugin-unicorn": "22.0.0",
@@ -99,16 +100,14 @@
"webpack:dev": "scripts/webpack-dev",
"build": "scripts/build",
"watch": "scripts/watch",
"removeCacheDir": "scripts/remove-cache-dir",
"test:compile": "scripts/test-compile",
"test:dev": "scripts/test-dev",
"test:devCompilePerformance": "scripts/test-dev-compile-performance",
"test:devRuntimePerformance": "scripts/test-dev-runtime-performance",
"test:full": "scripts/test-full",
"test:coveralls": "scripts/test-coveralls",
"test:mocha": "scripts/test-mocha",
"test:mocha-coverage": "scripts/test-mocha-coverage",
"test:mocha-memory-performance": "scripts/test-mocha-memory-performance",
"test:removeTmpDir": "scripts/test-remove-tmp-dir",
"test": "scripts/test",
"eslint": "scripts/eslint",
"travis": "scripts/travis",
-1
View File
@@ -1,6 +1,5 @@
#!/bin/bash
yarn run removeCacheDir &&
yarn run webpack:prod &&
yarn run eslint &&
yarn test
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
rm -rf .awcache
-4
View File
@@ -1,4 +0,0 @@
#!/bin/bash
$(yarn bin)/tsc -p test/tsconfig.test.json --outDir test-tmp &&
rsync -a --prune-empty-dirs --include '*/' --include '*.js' --include '*.json' --exclude '*' test/ test-tmp/test/
+2 -5
View File
@@ -1,7 +1,4 @@
#!/bin/bash
yarn run test:removeTmpDir &&
yarn run test:compile &&
$(yarn bin)/nyc $(yarn bin)/mocha -- test-tmp/test/index.spec.js --exit &&
$(yarn bin)/nyc report --reporter=text-lcov | $(yarn bin)/coveralls &&
yarn run test:removeTmpDir
yarn run test:mocha &&
$(yarn bin)/nyc report --reporter=text-lcov | $(yarn bin)/coveralls
+1 -4
View File
@@ -1,8 +1,5 @@
#!/bin/bash
yarn run test:removeTmpDir &&
yarn run test:compile &&
yarn run test:dev &&
$(yarn bin)/nyc --reporter text-summary $(yarn bin)/mocha -- test-tmp/test/index.spec.js --exit &&
yarn run test:removeTmpDir &&
yarn run test:mocha-coverage &&
yarn run test:mocha-memory-performance
+1 -4
View File
@@ -1,6 +1,3 @@
#!/bin/bash
yarn run test:removeTmpDir &&
yarn run test:compile &&
$(yarn bin)/mocha test-tmp/test/index.spec.js &&
yarn run test:removeTmpDir
$(yarn bin)/mocha --require ts-node/register --require source-map-support/register test/index.spec.ts --exit
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
$(yarn bin)/nyc --reporter text-summary yarn run test:mocha
+1 -4
View File
@@ -1,6 +1,3 @@
#!/bin/bash
yarn run test:removeTmpDir &&
yarn run test:compile &&
NODE_OPTIONS=--max-old-space-size=200 $(yarn bin)/mocha test-tmp/test/performance-tests/JavaScriptObfuscatorMemory.spec.js &&
yarn run test:removeTmpDir
NODE_OPTIONS=--max-old-space-size=200 $(yarn bin)/mocha --require ts-node/register test/performance-tests/JavaScriptObfuscatorMemory.spec.ts
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
rm -rf test-tmp
-2
View File
@@ -1,7 +1,5 @@
import 'reflect-metadata';
require('source-map-support').install();
/**
* Unit tests
*/
-1
View File
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../test-tmp",
"noEmitHelpers": true,
"importHelpers": true,
"inlineSourceMap": true,
+19 -12
View File
@@ -299,6 +299,13 @@
js-yaml "^3.13.1"
resolve-from "^5.0.0"
"@istanbuljs/nyc-config-typescript@1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@istanbuljs/nyc-config-typescript/-/nyc-config-typescript-1.0.1.tgz#55172f5663b3635586add21b14d42ca94a163d58"
integrity sha512-/gz6LgVpky205LuoOfwEZmnUtaSmdk0QIMcNFj9OvxhiMhPpKftMgZmGN7jNj7jR+lr8IB1Yks3QSSSNSxfoaQ==
dependencies:
"@istanbuljs/schema" "^0.1.2"
"@istanbuljs/schema@^0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd"
@@ -534,10 +541,10 @@
"@types/glob" "*"
"@types/node" "*"
"@types/sinon@9.0.7":
version "9.0.7"
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.7.tgz#c277e19cf9eb0c71106e785650f1e5c299262302"
integrity sha512-uyFiy2gp4P/FK9pmU3WIbT5ZzH54hCswwRkQFhxX7xl8jzhW3g+xOkVqk5YP4cIO//Few8UDAX0MtzFpqBEqwA==
"@types/sinon@9.0.8":
version "9.0.8"
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.8.tgz#1ed0038d356784f75b086104ef83bfd4130bb81b"
integrity sha512-IVnI820FZFMGI+u1R+2VdRaD/82YIQTdqLYC9DLPszZuynAJDtCvCtCs3bmyL66s7FqRM3+LPX7DhHnVTaagDw==
dependencies:
"@types/sinonjs__fake-timers" "*"
@@ -791,10 +798,10 @@ acorn-jsx@^5.2.0:
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe"
integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==
acorn@8.0.2:
version "8.0.2"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.2.tgz#f7503a253311d4af42332bc188d5713edb2e030a"
integrity sha512-t0Dw7AOyeKs4nez4dhzkBDHB28ICo1pxk3UFsLfsCHOkLW+CwbAZJPMa0vBbq0Mqsslhb7n/7H4qB5txaVQ4ew==
acorn@8.0.3:
version "8.0.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.3.tgz#68e78e53da020414420282428f1a4afd2075c2dc"
integrity sha512-uRMbCU3bM1L697KISxvkd9TA2zASoGFDODzFFdQR4qNpPffj6ZMdp5J4ffXUXR9G0PVPsN0enEkCrvssCkoPsw==
acorn@^6.4.1:
version "6.4.1"
@@ -2143,10 +2150,10 @@ eslint-plugin-import@2.22.1:
resolve "^1.17.0"
tsconfig-paths "^3.9.0"
eslint-plugin-jsdoc@30.6.2:
version "30.6.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.6.2.tgz#46f1f449dbf53445da2e8231e6954e4484ab5e04"
integrity sha512-LlRdsSQBSPsI3MvhWoGc+Ev3PfFRBk41wwkmbOgC7KP7WQlbeWPpASF5Vdv17XEZ7J+xvPB3KCMyR//6Dbjnnw==
eslint-plugin-jsdoc@30.6.3:
version "30.6.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.6.3.tgz#5d946f7a27bd9ee851c67838f607d85ea0492bfa"
integrity sha512-RnyM+a3SKRfPs/jqO2qOGAEZnOJT2dOhiwhBlYVp8/yRUUBNPlvkwZm0arrnyFKvfZX6WqSwlK5OcNnM5W1Etg==
dependencies:
comment-parser "^0.7.6"
debug "^4.1.1"