diff --git a/.nycrc b/.nycrc index 741e4f58..0a6cd58b 100644 --- a/.nycrc +++ b/.nycrc @@ -1,13 +1,4 @@ { - "nyc": { - "extends": "@salesforce/dev-config/nyc", - "check-coverage": true, - "lines": 90, - "statements": 90, - "functions": 90, - "branches": 90, - "reporter": ["lcov", "text"], - "extension": [".js"], - "exclude": ["bin/**/*.js", "**/*.test.js"] - } -} \ No newline at end of file + "extends": "@salesforce/dev-config/nyc", + "exclude": ["bin/**/*.js", "**/*.test.js"] +} diff --git a/bin/sf-test.js b/bin/sf-test.js index 0506a499..a89d5fb2 100755 --- a/bin/sf-test.js +++ b/bin/sf-test.js @@ -15,7 +15,7 @@ const mocha = require.resolve('mocha/bin/mocha'); const config = resolveConfig(packageRoot); const testConfig = config.test || {}; -const includes = testConfig.testsPath || '**/*.test.ts'; +const includes = testConfig.testsPath || 'test/**/*.test.ts'; const command = `node ${nyc} ${mocha} "${includes}"`; diff --git a/files/nycrc b/files/nycrc index 698313eb..5d1f87ba 100644 --- a/files/nycrc +++ b/files/nycrc @@ -1,5 +1,3 @@ { - "nyc": { "extends": "@salesforce/dev-config/nyc" - } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 4d194f70..759a1dd1 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@commitlint/cli": "^12.1.4", "@commitlint/config-conventional": "^10.0.0", "@oclif/dev-cli": "^1", - "@salesforce/dev-config": "^2.1.2", + "@salesforce/dev-config": "^2.1.3", "@salesforce/prettier-config": "^0.0.2", "@types/chai": "^4.2.11", "@types/mocha": "^8.2.2", diff --git a/utils/husky-init.js b/utils/husky-init.js index a379d6bd..df35b6e6 100644 --- a/utils/husky-init.js +++ b/utils/husky-init.js @@ -23,7 +23,7 @@ function initializeHusky() { if (localGitHooks.length === 0) { shell.exec("yarn husky add .husky/commit-msg 'yarn commitlint --edit'"); shell.exec("yarn husky add .husky/pre-commit 'yarn lint && yarn pretty-quick --staged'"); - shell.exec("yarn husky add .husky/pre-push 'yarn build && yarn test'"); + shell.exec("yarn husky add .husky/pre-push 'yarn build && yarn test --forbid-only'"); } } catch (err) { if (err.code === 'ENOENT') { diff --git a/yarn.lock b/yarn.lock index d2451d6d..0221082d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -522,10 +522,10 @@ resolved "https://registry.npmjs.org/@oclif/screen/-/screen-1.0.4.tgz#b740f68609dfae8aa71c3a6cab15d816407ba493" integrity sha512-60CHpq+eqnTxLZQ4PGHYNwUX572hgpMHGPtTWMjdTMsAvlm69lZV/4ly6O3sAYkomo4NggGcomrDpBe34rxUqw== -"@salesforce/dev-config@^2.1.2": - version "2.1.2" - resolved "https://registry.npmjs.org/@salesforce/dev-config/-/dev-config-2.1.2.tgz#b4e206f860e87065d068bf8ba3994a032389ad81" - integrity sha512-1swy07rynHoTRk8lj6nuC0JceRBo300OuWnovQe2OMvLpQM5Dh1SUnv1SE8012PsrK9BC1WqGXp4BUyMo04x7w== +"@salesforce/dev-config@^2.1.3": + version "2.1.3" + resolved "https://registry.npmjs.org/@salesforce/dev-config/-/dev-config-2.1.3.tgz#77fa29be9e1df2c5919c36d55b2fef9c9be27c46" + integrity sha512-J6NRMfwzgbKgo6/mO0ZhPxDKVNhoEd044vCTAxWLVJA5Ld7mB+/Sx6oosW89FvIkl0098LyfIMmwRDu/zcZd9g== "@salesforce/prettier-config@^0.0.2": version "0.0.2"