mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
Add transformer wrapper for yaml-jest to be compatible with v28,
following the hint at https://github.com/sumwatshade/jest-transform-yaml/issues/19#issuecomment-1232857013
This commit is contained in:
@@ -184,9 +184,9 @@ module.exports = {
|
||||
transform: {
|
||||
...tsjPreset.transform,
|
||||
"^.+\\.js$": "babel-jest",
|
||||
".*\\.(vue)$": "@vue/vue2-jest",
|
||||
"\\.yml$": "yaml-jest",
|
||||
"\\.txt$": "jest-raw-loader",
|
||||
"^.*\\.(vue)$": "@vue/vue2-jest",
|
||||
"^.+\\.ya?ml$": "<rootDir>/tests/jest/yaml-jest.js",
|
||||
"^.+\\.txt$": "jest-raw-loader",
|
||||
},
|
||||
|
||||
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
const transformer = require("yaml-jest").default
|
||||
|
||||
const newTransformer = {
|
||||
...transformer,
|
||||
process: function (...params) {
|
||||
return {
|
||||
code: transformer?.process(...params),
|
||||
map: null,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = newTransformer
|
||||
Reference in New Issue
Block a user