Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ module.exports = {
"json",
"html",
"text",
// "lcov",
// "clover"
// "lcov",
// "clover"
],

// An object that configures minimum threshold enforcement for coverage results
Expand Down Expand Up @@ -83,11 +83,11 @@ module.exports = {
moduleFileExtensions: [
"js",
"mjs",
// "jsx",
// "ts",
// "tsx",
// "json",
// "node"
// "jsx",
// "ts",
// "tsx",
// "json",
// "node"
],

// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
Expand Down Expand Up @@ -163,7 +163,7 @@ module.exports = {
testMatch: [
//"**/__tests__/**/*.[jt]s?(x)",
"**/__tests__/**/*_test.mjs",
"**/__tests__/**/*_test.bs.js",
"**/__tests__/**/*_test.res.mjs",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the .bs.js suffix here should be retained, for backwards compatibility. I think that should be fine?

//"**/?(*.)+(spec|test).[tj]s?(x)"
],

Expand All @@ -190,15 +190,15 @@ module.exports = {
// A map from regular expressions to paths to transformers
transform: {
"^.+\.m?js$": "babel-jest"
// "^.+\.js$": "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: [
"node_modules/(?!(rescript)/)"
// "/node_modules/",
// "\\.pnp\\.[^\\/]+$",
// "/src/"
// "/node_modules/",
// "\\.pnp\\.[^\\/]+$",
// "/src/"
],

// 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
2 changes: 1 addition & 1 deletion bsconfig.json → rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@glennsl/rescript-jest",
"namespace": false,
"bsc-flags": ["-bs-no-version-header", "-bs-super-errors"],
"suffix": ".bs.js",
"suffix": ".res.mjs",
"package-specs": {
"module": "commonjs",
"in-source": true
Expand Down