feat: add onGenerateMock transformer callback (#15429) #14266
Annotations
3 errors
|
run tests using jest-jasmine:
undefined#L1
expect(received).toMatchSnapshot()
Snapshot name: `Runtime jest.onGenerateMock calls single callback and returns transformed value 1`
- Snapshot - 5
+ Received + 5
@@ -1,7 +1,7 @@
Object {
- "filename": "/Users/s.v.zaytsev/IdeaProjects/jest/packages/jest-runtime/src/__tests__/test_root/RegularModule.js",
+ "filename": "/home/runner/work/jest/jest/packages/jest-runtime/src/__tests__/test_root/RegularModule.js",
"getModuleStateValue": [MockFunction],
"isLoaded": [MockFunction],
"isRealModule": true,
"jest": Object {
"advanceTimersByTime": [MockFunction],
@@ -57,20 +57,20 @@
"lazyRequire": [MockFunction],
"loaded": false,
"module": Object {
"children": Array [],
"exports": [Circular],
- "filename": "/Users/s.v.zaytsev/IdeaProjects/jest/packages/jest-runtime/src/__tests__/test_root/RegularModule.js",
- "id": "/Users/s.v.zaytsev/IdeaProjects/jest/packages/jest-runtime/src/__tests__/test_root/RegularModule.js",
+ "filename": "/home/runner/work/jest/jest/packages/jest-runtime/src/__tests__/test_root/RegularModule.js",
+ "id": "/home/runner/work/jest/jest/packages/jest-runtime/src/__tests__/test_root/RegularModule.js",
"isPreloading": false,
"loaded": true,
"main": null,
- "path": "/Users/s.v.zaytsev/IdeaProjects/jest/packages/jest-runtime/src/__tests__/test_root",
+ "path": "/home/runner/work/jest/jest/packages/jest-runtime/src/__tests__/test_root",
"paths": Array [],
"require": [MockFunction],
},
"object": Object {},
"parent": null,
- "path": "/Users/s.v.zaytsev/IdeaProjects/jest/packages/jest-runtime/src/__tests__/test_root",
+ "path": "/home/runner/work/jest/jest/packages/jest-runtime/src/__tests__/test_root",
"paths": Array [],
"setModuleStateValue": [MockFunction],
}
at Object.toMatchSnapshot (packages/jest-runtime/src/__tests__/runtime_mock.test.js:161:47)
|
run tests using jest-jasmine
The operation was canceled.
|
Loading