Skip to content

Commit

Permalink
Merge pull request #5 from IPQualityScore/updating_unit_tests_and_ts_…
Browse files Browse the repository at this point in the history
…and_jest_config

Updating Unit Tests and TS/Jest configs
  • Loading branch information
IPQualityScore committed Nov 25, 2023
2 parents dd3f830 + 833b543 commit 48b77c0
Show file tree
Hide file tree
Showing 8 changed files with 248 additions and 89 deletions.
13 changes: 13 additions & 0 deletions .babelrc
@@ -0,0 +1,13 @@
{
"presets": [
[
"@babel/preset-env", {
"targets": {
"node": "current"
}}],
"@babel/preset-typescript"
],
"plugins": [
"babel-plugin-rewire-ts"
]
}
22 changes: 22 additions & 0 deletions .eslintrc
@@ -0,0 +1,22 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
}
}
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
/node_modules/
/coverage/
/.idea/
9 changes: 6 additions & 3 deletions jest.config.ts
Expand Up @@ -100,7 +100,7 @@ export default {
// notifyMode: "failure-change",

// A preset that is used as a base for Jest's configuration
// preset: undefined,
preset: "ts-jest",

// Run tests from one or more projects
// projects: undefined,
Expand Down Expand Up @@ -173,7 +173,10 @@ export default {
// testRunner: "jest-circus/runner",

// A map from regular expressions to paths to transformers
// transform: undefined,
transform: {
"^.+\\.ts?$": "babel-jest",
"^.+\\.js$": "babel-jest",
},

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
Expand All @@ -192,4 +195,4 @@ export default {

// Whether to use watchman for file crawling
// watchman: true,
};
};

0 comments on commit 48b77c0

Please sign in to comment.