-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add tests and lint checks (#24)
- Loading branch information
1 parent
224375e
commit 6cc66d4
Showing
11 changed files
with
2,859 additions
and
197 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
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
/coverage/ |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/* eslint-env node */ | ||
export default { | ||
module.exports = { | ||
presets: [ | ||
[ | ||
"@splunk/babel-preset", | ||
|
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,42 @@ | ||
import type { Config } from "jest"; | ||
|
||
export default { | ||
// Mock | ||
clearMocks: true, | ||
restoreMocks: true, | ||
// env settings | ||
testEnvironment: "jest-fixed-jsdom", | ||
setupFilesAfterEnv: ["<rootDir>/tests/jest.setup.ts"], | ||
// Coverage | ||
collectCoverage: true, | ||
collectCoverageFrom: ["src/**/*.{js,jsx,ts,tsx}"], | ||
coveragePathIgnorePatterns: [ | ||
"/node_modules/", | ||
/* | ||
TYPES | ||
*/ | ||
// *.d.ts files | ||
"\\.d\\.ts$", | ||
"/types/", | ||
"\\.types\\.ts$", | ||
], | ||
coverageDirectory: "coverage", | ||
testEnvironmentOptions: { | ||
/** | ||
* @note Opt-out from JSDOM using browser-style resolution | ||
* for dependencies. This is simply incorrect, as JSDOM is | ||
* not a browser, and loading browser-oriented bundles in | ||
* Node.js will break things. | ||
* | ||
* Consider migrating to a more modern test runner if you | ||
* don't want to deal with this. | ||
*/ | ||
customExportConditions: [""], | ||
}, | ||
errorOnDeprecated: true, | ||
// moduleNameMapper: { | ||
// // Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451 | ||
// uuid: require.resolve("uuid"), | ||
// "\\.(css)$": "<rootDir>/src/mocks/styleMock.js", | ||
// }, | ||
} satisfies Config; |
Oops, something went wrong.