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
Executing npm run test for the very first time (or after long time -I guess after reboot too-) always fail with the errors shown below.
If you hit Ctrl+C and then execute npm run test again, it will work and pass all tests.
No matter how many times you repeat it, it will work every time. But after a while, it happen again.
My guess is that it is something related to puppeteer first loading. But this is done (deeply) inside an async before hook so tests are supposed to not run after its resolution.
Sample output when fails:
$ npm run test
> [email protected] pretest
> npm run build
> [email protected] build
> rollup -c --environment BUILD:production
src/main.js → dist/SmarkForm.esm.js, dist/SmarkForm.umd.js...
created dist/SmarkForm.esm.js, dist/SmarkForm.umd.js in 2.8s
src/examples/index.js → tmp/index.js...
(!) Generated an empty chunk
"index"
created tmp/index.js in 491ms
> [email protected] test
> mocha
General Functionality Tests
1) "before all" hook for "Document loaded"
2) "after all" hook for "Basic introspection works"
List Component Type Test
3) "before all" hook for "addItem action works"
4) "after all" hook for "Exports correctly"
0 passing (4s)
4 failing
1) General Functionality Tests
"before all" hook for "Document loaded":
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/joanmi/Nextcloud/prj/lib/SmarkForm/test/general.tests.js)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
2) General Functionality Tests
"after all" hook for "Basic introspection works":
TypeError: Cannot read properties of undefined (reading 'close')
at Context.<anonymous> (file:///home/joanmi/Nextcloud/prj/lib/SmarkForm/test/general.tests.js:198:34)
at process.processImmediate (node:internal/timers:478:21)
3) List Component Type Test
"before all" hook for "addItem action works":
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/joanmi/Nextcloud/prj/lib/SmarkForm/test/type_list.tests.js)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
4) List Component Type Test
"after all" hook for "Exports correctly":
TypeError: Cannot read properties of undefined (reading 'close')
at Context.<anonymous> (file:///home/joanmi/Nextcloud/prj/lib/SmarkForm/test/type_list.tests.js:184:34)
at process.processImmediate (node:internal/timers:478:21)
^C
Sample output the rest of times:
$ npm run test
> [email protected] pretest
> npm run build
> [email protected] build
> rollup -c --environment BUILD:production
src/main.js → dist/SmarkForm.esm.js, dist/SmarkForm.umd.js...
created dist/SmarkForm.esm.js, dist/SmarkForm.umd.js in 1.6s
src/examples/index.js → tmp/index.js...
(!) Generated an empty chunk
"index"
created tmp/index.js in 214ms
> [email protected] test
> mocha
General Functionality Tests
✔ Document loaded
✔ Basic introspection works
List Component Type Test
✔ addItem action works (58ms)
✔ removeItem action works
✔ min_items limit applies
✔ max_items limit applies
✔ Imports correctly
✔ Exports correctly
8 passing (2s)
The text was updated successfully, but these errors were encountered:
Executing
npm run test
for the very first time (or after long time -I guess after reboot too-) always fail with the errors shown below.If you hit Ctrl+C and then execute
npm run test
again, it will work and pass all tests.No matter how many times you repeat it, it will work every time. But after a while, it happen again.
My guess is that it is something related to puppeteer first loading. But this is done (deeply) inside an async before hook so tests are supposed to not run after its resolution.
Sample output when fails:
Sample output the rest of times:
The text was updated successfully, but these errors were encountered: