I configure my express application as laid out in the README using i18n-express 1.1.3 and the application starts without a problem.
However, when I test my application using Jest, I receive the following error:
Jest has detected the following 1 open handle potentially keeping Jest from exiting:
● FSEVENTWRAP
23 |
24 | app.use(
> 25 | i18n({
| ^
Looks like the constructor activates a file system watch on the translationsPath directory, which I think doesn't get closed in the scope of my tests. It looks like there's an option to allow closing the watcher with an abort signal https://nodejs.org/docs/latest-v18.x/api/fs.html#fswatchfilename-options-listener, but the option isn't set in the call to fs.watch.
In the meantime, since I know roughly where the issue originates, I can --forceExit my jest tests in the meantime.
I configure my express application as laid out in the README using i18n-express 1.1.3 and the application starts without a problem.
However, when I test my application using Jest, I receive the following error:
Jest has detected the following 1 open handle potentially keeping Jest from exiting:
● FSEVENTWRAP
Looks like the constructor activates a file system watch on the translationsPath directory, which I think doesn't get closed in the scope of my tests. It looks like there's an option to allow closing the watcher with an abort signal https://nodejs.org/docs/latest-v18.x/api/fs.html#fswatchfilename-options-listener, but the option isn't set in the call to fs.watch.
In the meantime, since I know roughly where the issue originates, I can
--forceExitmy jest tests in the meantime.