Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infinite loop when using jest.userFakeTimers() before when using typeOrm by pg-mem #406

Open
vincehypercloud opened this issue Jun 11, 2024 · 0 comments

Comments

@vincehypercloud
Copy link

Describe the bug

infinite loop when using jest.userFakeTimers() before when using typeOrm by pg-mem

(Describe your issue here).
When I try to use jest.useFakeTimers().setSystemTime(new Date())
before I save() or find() typeOrm of pg-mem
it loops in the maximum delay time in cli.js

and the debugger goes to this function

// }),
/
333 /
/
/ (function(module, exports, webpack_require) {

var ITERATOR = webpack_require(44)('iterator');
var SAFE_CLOSING = false;

try {
var riter = [7]ITERATOR;
riter['return'] = function () { SAFE_CLOSING = true; };
// eslint-disable-next-line no-throw-literal
Array.from(riter, function () { throw 2; }); <-- debug point
} catch (e) { /* empty */ }```

To Reproduce

not query related

pg-mem version

2.8.1 (paste your pg-mem version here)

(nb: the version in your package.json version is often not precise enough... please run "cat ./node_modules/pg-mem/package.json | grep version" to tell which minor version is actually installed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant