You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the result when running jest --detectOpenHandles is:
jest --detectOpenHandles test/integration/commands/eval
PASS test/integration/commands/eval.js
PASS test/integration/commands/evalsha.js
Test Suites: 2 passed, 2 total
Tests: 16 passed, 16 total
Snapshots: 0 total
Time: 0.437 s, estimated 2 s
Ran all test suites matching /test\/integration\/commands\/eval/i.
Jest has detected the following 1 open handle potentially keeping Jest from exiting:
● TTYWRAP
171 | // init fengari
172 | const L = lauxlib.luaL_newstate()
> 173 | lualib.luaL_openlibs(L)
| ^
174 | interop.luaopen_js(L)
175 | return {
176 | L,
at luaopen_io (node_modules/fengari/src/liolib.js:224:30)
at luaD_precall (node_modules/fengari/src/ldo.js:169:21)
at luaD_call (node_modules/fengari/src/ldo.js:366:10)
at Object.luaD_callnoyield (node_modules/fengari/src/ldo.js:685:5)
at lua_callk (node_modules/fengari/src/lapi.js:968:13)
at lua_call (node_modules/fengari/src/lapi.js:976:5)
at luaL_requiref (node_modules/fengari/src/lauxlib.js:637:9)
at Object.luaL_openlibs (node_modules/fengari/src/linit.js:13:9)
at luaL_openlibs (src/lua.js:173:10)
at RedisMock.customCommand2 (src/commands/defineCommand.js:96:20)
at commandEmulator (src/command.js:116:18)
at safelyExecuteCommand (src/command.js:150:11)
at src/command.js:147:7
at RedisMock.evaluate (src/commands/eval.js:15:4)
at RedisMock.apply (src/commands/eval.js:19:30)
at commandEmulator (src/command.js:116:18)
at safelyExecuteCommand (src/command.js:150:11)
at RedisMock.evalBuffer (src/command.js:147:7)
at Object.<anonymous> (test/integration/commands/eval.js:15:42)
The text was updated successfully, but these errors were encountered:
When running Jest tests that include the eval command, an open handle is left, preventing Jest from exiting cleanly.
this can be easily reproduce using node 20.15.1 or higher and adding a test in the test/integration/commands/eval.js
like so:
(example form the documentation https://www.npmjs.com/package/ioredis-mock#lua-scripting )
the result when running jest --detectOpenHandles is:
The text was updated successfully, but these errors were encountered: