generated from xddq/nodejs-typescript-modern-starter
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cleanup, update readme, use jest and npm scripts (#49)
## Summary Just cleaning up a little. - use jest instead of nodejs test runner - remove tasks.mjs file and just use npm scripts - slightly move test files - update readme
- Loading branch information
Showing
18 changed files
with
3,489 additions
and
675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,4 +141,4 @@ TODO | |
.yarn | ||
generated-typebox.ts | ||
examples | ||
test/integration/schemas/*.ts | ||
test/fixture/*.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ jobs: | |
- name: Install Dependencies | ||
run: yarn --immutable | ||
- name: Lint | ||
run: yarn lint-check | ||
run: yarn lint:check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,4 +139,5 @@ node_modules | |
TODO* | ||
/schema.json | ||
generated-typebox.ts | ||
.envrc | ||
!examples/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
presets: [ | ||
["@babel/preset-env", { targets: { node: "current" } }], | ||
"@babel/preset-typescript", | ||
], | ||
// required for easily mocking module exports. | ||
// see: https://stackoverflow.com/questions/67872622/jest-spyon-not-working-on-index-file-cannot-redefine-property | ||
assumptions: { | ||
constantReexports: true, | ||
}, | ||
plugins: [], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
//@ts-check | ||
/** | ||
* For a detailed explanation regarding each configuration property, visit: | ||
* https://jestjs.io/docs/configuration | ||
*/ | ||
|
||
/** @type {import('jest').Config} */ | ||
const config = { | ||
// Automatically clear mock calls, instances, contexts and results before every test | ||
clearMocks: true, | ||
// Indicates whether the coverage information should be collected while executing the test | ||
collectCoverage: true, | ||
coverageReporters: ["lcov", "text"], | ||
collectCoverageFrom: [ | ||
"src/*.ts", | ||
"!**/node_modules/**", | ||
"!**/dist/**", | ||
"!**/*.(spec|test|d).ts", | ||
], | ||
// The directory where Jest should output its coverage files | ||
coverageDirectory: "coverage", | ||
// Indicates which provider should be used to instrument code for coverage | ||
coverageProvider: "v8", | ||
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped | ||
testPathIgnorePatterns: ["/node_modules/", "/dist/"], | ||
// Indicates whether each individual test should be reported during the run | ||
verbose: true, | ||
testMatch: [ | ||
"**/test/**/*.[jt]s?(x)", | ||
"!**/test/util/**/*.[jt]s?(x)", | ||
"!**/test/fixture/**/*.[jt]s?(x)", | ||
"**/?(*.)+(spec|test).[tj]s?(x)", | ||
], | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.