forked from JSKitty/scc-web3
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add jest test framework * Remove console.logs * Remove outdated preset that depended on vulnerable packages
- Loading branch information
Showing
6 changed files
with
13,784 additions
and
3,781 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"presets": ["@babel/preset-env"], | ||
"plugins": ["babel-plugin-transform-import-meta"] | ||
} |
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 |
---|---|---|
|
@@ -42,3 +42,5 @@ jobs: | |
with: | ||
eslint: true | ||
prettier: true | ||
- name: Run tests | ||
run: npm test |
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,24 @@ | ||
/** | ||
* For a detailed explanation regarding each configuration property, visit: | ||
* https://jestjs.io/docs/configuration | ||
*/ | ||
|
||
/** @type {import('jest').Config} */ | ||
const config = { | ||
// An array of file extensions your modules use | ||
moduleFileExtensions: ['js', 'json', 'vue'], | ||
|
||
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module | ||
moduleNameMapper: { | ||
'^lodash-es$': 'lodash', | ||
}, | ||
|
||
// The test environment that will be used for testing | ||
testEnvironment: 'node', | ||
transform: { | ||
'.*\\.(vue)$': '@vue/vue3-jest', | ||
'.*\\.(js)$': 'babel-jest', | ||
}, | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.