Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vbrvk committed Mar 12, 2024
1 parent c7a632d commit a6e1467
Show file tree
Hide file tree
Showing 5 changed files with 236 additions and 1,136 deletions.
11 changes: 11 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
},
"transform": {
"decoratorMetadata": true
}
}
}
6 changes: 0 additions & 6 deletions babel.config.js

This file was deleted.

21 changes: 8 additions & 13 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
// collectCoverage: false,

// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: undefined,
collectCoverageFrom: ['**/*.(t|j)s'],

// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
Expand Down Expand Up @@ -70,14 +70,8 @@ export default {
// ],

// An array of file extensions your modules use
// moduleFileExtensions: [
// "js",
// "json",
// "jsx",
// "ts",
// "tsx",
// "node"
// ],
moduleFileExtensions: ['js', 'json', 'ts'],


// 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: {},
Expand Down Expand Up @@ -113,7 +107,7 @@ export default {
// restoreMocks: false,

// The root directory that Jest should scan for tests and modules within
// rootDir: undefined,
rootDir: 'src',

// A list of paths to directories that Jest should use to search for files in
// roots: [
Expand Down Expand Up @@ -169,13 +163,14 @@ export default {
// timers: "real",

// A map from regular expressions to paths to transformers
// transform: undefined,

transform: {
'^.+\\.(t|j)s$': '@swc/jest'
},
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
transformIgnorePatterns: [
// "/node_modules/",
// "\\.pnp\\.[^\\/]+$",
'node_modules/(?!axios)'
'node_modules/.pnpm/(?!axios)'
]

// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@
"devDependencies": {
"@1inch/tsconfig": "1.0.7",
"@1inch/eslint-config": "1.4.3",
"@babel/core": "^7.13.16",
"@babel/preset-env": "^7.13.15",
"@babel/preset-typescript": "^7.13.0",
"@types/jest": "^26.0.22",
"@types/prompts": "^2.0.12",
"@types/ws": "^8.5.4",
"@swc/core": "1.3.66",
"@swc/jest": "0.2.26",
"axios": "^1.6.7",
"babel-jest": "^26.6.3",
"@typescript-eslint/eslint-plugin": "5.59",
"@typescript-eslint/parser": "5.51",
"eslint": "8.41.0",
Expand Down
Loading

0 comments on commit a6e1467

Please sign in to comment.