Skip to content

Commit adab074

Browse files
committed
add third-party package (redux-undo) tests
1 parent a0d850b commit adab074

File tree

5 files changed

+68
-0
lines changed

5 files changed

+68
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "redux-undo-tests-cjs",
3+
"version": "1.0.0",
4+
"main": "redux-undo-cjs.test.js",
5+
"license": "MIT",
6+
"devDependencies": {
7+
"@babel/core": "^7.24.6",
8+
"babel-jest": "^29.7.0",
9+
"jest": "^29.7.0"
10+
},
11+
"scripts": {
12+
"test": "jest --config=../../../jest.config.js"
13+
},
14+
"dependencies": {
15+
"redux-undo": "^1.1.0"
16+
}
17+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const pluginTransform = require("../../../pluginTransform");
2+
3+
describe("third-party package (redux-undo) transformation for CommonJS", () => {
4+
test("transformation of redux-undo", () => {
5+
const pluginOptions = { isCacheEnabled: true };
6+
expect(
7+
pluginTransform(
8+
'import { ActionCreators } from "../redux-experience";',
9+
__filename,
10+
pluginOptions
11+
)
12+
).toBe([
13+
`import { ActionCreators } from \"redux-undo";`,
14+
].join("\n").replaceAll("\\","\\\\"));
15+
});
16+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "redux-undo-tests-esm",
3+
"version": "1.0.0",
4+
"main": "redux-undo-esm.test.js",
5+
"type": "module",
6+
"license": "MIT",
7+
"devDependencies": {
8+
"@babel/core": "^7.24.6",
9+
"babel-jest": "^29.7.0",
10+
"jest": "^29.7.0"
11+
},
12+
"scripts": {
13+
"test": "jest --config=../../jest.config.js"
14+
},
15+
"dependencies": {
16+
"redux-undo": "^1.1.0"
17+
}
18+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const pluginTransform = require("../../../pluginTransform");
2+
3+
describe("third-party package (redux-undo) transformation for ESM", () => {
4+
test("transformation of redux-undo", () => {
5+
const pluginOptions = { isCacheEnabled: true };
6+
expect(
7+
pluginTransform(
8+
'import { ActionCreators } from "../redux-experience";',
9+
__filename,
10+
pluginOptions
11+
)
12+
).toBe([
13+
`import { ActionCreators } from \"redux-undo";`,
14+
].join("\n").replaceAll("\\","\\\\"));
15+
});
16+
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "redux-undo";

0 commit comments

Comments
 (0)