1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 19:10:22 +01:00

Unifies unit tests filename suffix to .test.js (#10607)

* Unifies the filename suffix to .test.js

* Display @babel/no-invalid-this rule for tx-controller.test.js

* Add test file extension to test:unit:global
This commit is contained in:
Thomas Huang 2021-03-09 11:08:06 -08:00 committed by GitHub
parent 083a795a30
commit 3ba91df387
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 6 additions and 5 deletions

View File

@ -20,10 +20,10 @@
"forwarder": "node ./development/static-server.js ./node_modules/@metamask/forwarder/dist/ --port 9010",
"dapp-forwarder": "concurrently -k -n forwarder,dapp -p '[{time}][{name}]' 'yarn forwarder' 'yarn dapp'",
"sendwithprivatedapp": "node development/static-server.js test/e2e/send-eth-with-private-key-test --port 8080",
"test:unit": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/**/*.js\" \"ui/app/**/*.test.js\"",
"test:unit:global": "mocha --exit --require test/env.js --require test/setup.js --recursive test/unit-global/*",
"test:unit:lax": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/{,**/!(permissions)}/*.js\" \"ui/app/**/*.test.js\"",
"test:unit:strict": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/**/permissions/*.js\"",
"test:unit": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/**/*.test.js\" \"ui/app/**/*.test.js\"",
"test:unit:global": "mocha --exit --require test/env.js --require test/setup.js --recursive test/unit-global/*.test.js",
"test:unit:lax": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/{,**/!(permissions)}/*.test.js\" \"ui/app/**/*.test.js\"",
"test:unit:strict": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/**/permissions/*.test.js\"",
"test:unit:path": "mocha --exit --require test/env.js --require test/setup.js --recursive",
"test:e2e:chrome": "SELENIUM_BROWSER=chrome test/e2e/run-all.sh",
"test:e2e:chrome:metrics": "SELENIUM_BROWSER=chrome mocha test/e2e/metrics.spec.js",

View File

@ -437,6 +437,7 @@ describe('Transaction Controller', function () {
gasPrice: originalValue,
},
};
// eslint-disable-next-line @babel/no-invalid-this
this.timeout(15000);
const wrongValue = '0x05';

View File

@ -70,7 +70,7 @@ describe('migrations', function () {
const fileNames = fs.readdirSync('./test/unit/migrations/');
const testNumbers = fileNames
.reduce((acc, filename) => {
const name = filename.split('-test.')[0];
const name = filename.split('.test.')[0];
if (/^\d+$/u.test(name)) {
acc.push(name);
}