Skip to content

Commit 0152d64

Browse files
authored
Merge pull request #475 from nomiclabs/test-dev-perf-enhancements
Test dev perf enhancements
2 parents 68c6f0c + 2cec610 commit 0152d64

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+500
-481
lines changed

.gitignore

+2-6
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ package-lock.json
88

99
.DS_Store
1010

11-
# Below is Github's node gitignore template, except for dotenv's entries as it's used by mocha to pass flags to ts-node,
12-
# and ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
11+
# Below is Github's node gitignore template,
12+
# ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
1313

1414
# Logs
1515
logs
@@ -71,10 +71,6 @@ typings/
7171
# Yarn Integrity file
7272
.yarn-integrity
7373

74-
# dotenv environment variables file
75-
#.env
76-
#.env.test
77-
7874
# parcel-bundler cache (https://parceljs.org/)
7975
.cache
8076

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"devDependencies": {
88
"@types/mocha": "^5.2.6",
99
"@types/node": "^8.10.44",
10+
"@types/shelljs": "^0.8.6",
1011
"chai": "^4.2.0",
11-
"dotenv": "^6.2.0",
1212
"ganache-cli": "^6.4.3",
1313
"lerna": "^3.13.4",
1414
"mocha": "^5.2.0",

packages/buidler-core/.gitignore

+2-6
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
/builtin-tasks
2121
/internal
2222

23-
# Below is Github's node gitignore template, except for dotenv's entries as it's used by mocha to pass flags to ts-node,
24-
# and ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
23+
# Below is Github's node gitignore template,
24+
# ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
2525

2626
# Logs
2727
logs
@@ -83,10 +83,6 @@ typings/
8383
# Yarn Integrity file
8484
.yarn-integrity
8585

86-
# dotenv environment variables file
87-
#.env
88-
#.env.test
89-
9086
# parcel-bundler cache (https://parceljs.org/)
9187
.cache
9288

packages/buidler-core/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"lint": "npm run lint-src && npm run lint-tests",
3232
"lint-tests": "node -r ts-node/register ../../node_modules/tslint/bin/tslint --config tslint.json --project ./tsconfig.json",
3333
"lint-src": "node -r ts-node/register ../../node_modules/tslint/bin/tslint --config tslint.json --project src/tsconfig.json",
34-
"test": "node ../../node_modules/mocha/bin/mocha",
35-
"coverage": "node ../../node_modules/nyc/bin/nyc.js ../../node_modules/mocha/bin/mocha",
34+
"test": "node ../../node_modules/mocha/bin/mocha --recursive test/**/*.ts ",
35+
"coverage": "node ../../node_modules/nyc/bin/nyc.js ../../node_modules/mocha/bin/mocha --recursive test/**/*.ts",
3636
"build": "node ../../node_modules/typescript/bin/tsc --build src",
3737
"build-test": "node ../../node_modules/typescript/bin/tsc --build .",
3838
"clean": "node ../../node_modules/rimraf/bin.js builtin-tasks internal *.d.ts *.map *.js build-test tsconfig.tsbuildinfo"

packages/buidler-core/test/internal/core/typescript-support.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe("Typescript support", function() {
1717
it("Should fail if an implicit any is used and the tsconfig forbids them", function() {
1818
// If we run this test in transpilation only mode, it will fail
1919
if (process.env.TS_NODE_TRANSPILE_ONLY === "true") {
20-
return;
20+
this.skip();
2121
}
2222

2323
assert.throws(
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
process.env.TS_NODE_FILES = "true";
2+
process.env.TS_NODE_TRANSPILE_ONLY = "true";

packages/buidler-core/test/mocha.opts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
--require test/mocha.env
12
--require ts-node/register
23
--require source-map-support/register
3-
--recursive test/**/*.ts --exclude test/fixture-projects/**/*.ts --exclude test/fixture-projects/**/*.js --exclude test/helpers/**/*.ts
4+
--exclude test/fixture-projects/**/*.ts --exclude test/fixture-projects/**/*.js --exclude test/helpers/**/*.ts
45
--timeout 25000

packages/buidler-docker/.env

-1
This file was deleted.

packages/buidler-docker/.gitignore

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
/coverage
1010
/.nyc_output
1111

12-
# Below is Github's node gitignore template, except for dotenv's entries as it's used by mocha to pass flags to ts-node,
13-
# and ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
12+
# Below is Github's node gitignore template,
13+
# ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
1414

1515
# Logs
1616
logs
@@ -72,10 +72,6 @@ typings/
7272
# Yarn Integrity file
7373
.yarn-integrity
7474

75-
# dotenv environment variables file
76-
#.env
77-
#.env.test
78-
7975
# parcel-bundler cache (https://parceljs.org/)
8076
.cache
8177

packages/buidler-docker/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"lint-tests": "node ../../node_modules/tslint/bin/tslint --config tslint.json --project ./tsconfig.json",
1919
"watch": "node ../../node_modules/typescript/bin/tsc -w",
2020
"lint-src": "node ../../node_modules/tslint/bin/tslint --config tslint.json --project src/tsconfig.json",
21-
"test": "node ./scripts/run-tests.js",
21+
"test": "node ../../node_modules/mocha/bin/mocha --recursive test/**/*.ts --exit",
2222
"build": "node ../../node_modules/typescript/bin/tsc --build src",
2323
"build-test": "node ../../node_modules/typescript/bin/tsc --build .",
2424
"clean": "node ../../node_modules/rimraf/bin.js dist build-test"

packages/buidler-docker/scripts/run-tests.js

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
process.env.TS_NODE_FILES = "true";
2+
process.env.TS_NODE_TRANSPILE_ONLY = "true";
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
--require dotenv/config
1+
--require test/mocha.env
22
--require ts-node/register
33
--require source-map-support/register
4-
--recursive test/**/*.ts
54
--timeout 6000

packages/buidler-ethers/.env

-1
This file was deleted.

packages/buidler-ethers/.gitignore

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
/coverage
1010
/.nyc_output
1111

12-
# Below is Github's node gitignore template, except for dotenv's entries as it's used by mocha to pass flags to ts-node,
13-
# and ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
12+
# Below is Github's node gitignore template,
13+
# ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
1414

1515
# Logs
1616
logs
@@ -72,10 +72,6 @@ typings/
7272
# Yarn Integrity file
7373
.yarn-integrity
7474

75-
# dotenv environment variables file
76-
#.env
77-
#.env.test
78-
7975
# parcel-bundler cache (https://parceljs.org/)
8076
.cache
8177

packages/buidler-ethers/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"lint": "npm run lint-src && npm run lint-tests",
2121
"lint-tests": "node ../../node_modules/tslint/bin/tslint --config tslint.json --project ./tsconfig.json",
2222
"lint-src": "node ../../node_modules/tslint/bin/tslint --config tslint.json --project src/tsconfig.json",
23-
"test": "node scripts/run-tests.js",
23+
"test": "node ../../node_modules/mocha/bin/mocha --recursive test/**/*.ts --exit",
2424
"build": "node ../../node_modules/typescript/bin/tsc --build src",
2525
"build-test": "node ../../node_modules/typescript/bin/tsc --build .",
2626
"clean": "node ../../node_modules/rimraf/bin.js dist build-test"

packages/buidler-ethers/scripts/run-tests.js

-47
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
process.env.TS_NODE_FILES = "true";
2+
process.env.TS_NODE_TRANSPILE_ONLY = "true";
3+
4+
// Args string to be passed to the Ganache CLI instance for test, splitted by "," or " " (space)
5+
process.env.GANACHE_CLI_ARGS = "-d";
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--require dotenv/config
1+
--require test/mocha.env
22
--require ts-node/register
33
--require source-map-support/register
4-
--recursive test/**/*.ts
4+
--file ../common/test/run-with-ganache
55
--timeout 6000

packages/buidler-etherscan/.env

-1
This file was deleted.

packages/buidler-etherscan/.gitignore

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
/coverage
1010
/.nyc_output
1111

12-
# Below is Github's node gitignore template, except for dotenv's entries as it's used by mocha to pass flags to ts-node,
13-
# and ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
12+
# Below is Github's node gitignore template,
13+
# ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
1414

1515
# Logs
1616
logs
@@ -72,10 +72,6 @@ typings/
7272
# Yarn Integrity file
7373
.yarn-integrity
7474

75-
# dotenv environment variables file
76-
#.env
77-
#.env.test
78-
7975
# parcel-bundler cache (https://parceljs.org/)
8076
.cache
8177

packages/buidler-etherscan/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"lint": "npm run lint-src && npm run lint-tests",
2525
"lint-tests": "node ../../node_modules/tslint/bin/tslint --config tslint.json --project ./tsconfig.json",
2626
"lint-src": "node ../../node_modules/tslint/bin/tslint --config tslint.json --project src/tsconfig.json",
27-
"test": "node scripts/run-tests.js",
27+
"test": "node ../../node_modules/mocha/bin/mocha --recursive test/**/*.ts --exit",
2828
"build": "node ../../node_modules/typescript/bin/tsc --build src",
2929
"build-test": "node ../../node_modules/typescript/bin/tsc --build .",
3030
"clean": "node ../../node_modules/rimraf/bin.js dist build-test"

packages/buidler-etherscan/scripts/run-tests.js

-47
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
process.env.TS_NODE_FILES = "true";
2+
process.env.TS_NODE_TRANSPILE_ONLY = "true";
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--require dotenv/config
1+
--require test/mocha.env
22
--require ts-node/register
33
--require source-map-support/register
4-
--recursive test/**/*.ts
4+
--file ../common/test/run-with-ganache
55
--timeout 6000

packages/buidler-ganache/.env

-1
This file was deleted.

packages/buidler-ganache/.gitignore

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
/coverage
1010
/.nyc_output
1111

12-
# Below is Github's node gitignore template, except for dotenv's entries as it's used by mocha to pass flags to ts-node,
13-
# and ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
12+
# Below is Github's node gitignore template,
13+
# ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
1414

1515
# Logs
1616
logs
@@ -72,10 +72,6 @@ typings/
7272
# Yarn Integrity file
7373
.yarn-integrity
7474

75-
# dotenv environment variables file
76-
#.env
77-
#.env.test
78-
7975
# parcel-bundler cache (https://parceljs.org/)
8076
.cache
8177

packages/buidler-ganache/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"lint": "npm run lint-src && npm run lint-tests",
2222
"lint-tests": "node ../../node_modules/tslint/bin/tslint --config tslint.json --project ./tsconfig.json",
2323
"lint-src": "node ../../node_modules/tslint/bin/tslint --config tslint.json --project src/tsconfig.json",
24-
"test": "node scripts/run-tests.js",
24+
"test": "node ../../node_modules/mocha/bin/mocha --recursive test/*.ts --exit",
2525
"build": "node ../../node_modules/typescript/bin/tsc --build src",
2626
"build-test": "node ../../node_modules/typescript/bin/tsc --build .",
2727
"clean": "node ../../node_modules/rimraf/bin.js dist build-test"

packages/buidler-ganache/scripts/run-tests.js

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
process.env.TS_NODE_FILES = "true";
2+
process.env.TS_NODE_TRANSPILE_ONLY = "true";
+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
--require dotenv/config
1+
--require test/mocha.env
22
--require ts-node/register
33
--require source-map-support/register
4-
--recursive test/*.ts
5-
--timeout 5000
4+
--timeout 8000

packages/buidler-solhint/.env

-1
This file was deleted.

packages/buidler-solhint/.gitignore

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
/coverage
1010
/.nyc_output
1111

12-
# Below is Github's node gitignore template, except for dotenv's entries as it's used by mocha to pass flags to ts-node,
13-
# and ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
12+
# Below is Github's node gitignore template,
13+
# ignoring the node_modules part, as it'd ignore every node_modules, and we have some for testing
1414

1515
# Logs
1616
logs
@@ -72,10 +72,6 @@ typings/
7272
# Yarn Integrity file
7373
.yarn-integrity
7474

75-
# dotenv environment variables file
76-
#.env
77-
#.env.test
78-
7975
# parcel-bundler cache (https://parceljs.org/)
8076
.cache
8177

0 commit comments

Comments
 (0)