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
I have tried to create test cases for custom nodes generated from a subflow but the test using helper module fails. In this issue, I wrote the example case of the error using a lower-case node created from subflow which contains a function node to use msg.payload.toLowerCase();.
What are the steps to reproduce?
Prepare the following files under the node-red-contrib-example-lower-case directory. And then, execute the npm install and npm test commands.
$ npm test
> test
> mocha "test/**/*_spec.js"
lower-case Node
1) should be loaded
2) should make payload lower case
0 passing (4s)
2 failing
1) lower-case Node
should be loaded:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/kazuhitoyokoi/Desktop/node-red-contrib-example-lower-case/test/lower-case_spec.js)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)
2) lower-case Node
should make payload lower case:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/kazuhitoyokoi/Desktop/node-red-contrib-example-lower-case/test/lower-case_spec.js)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)
What do you expect to happen?
The npm test command passes the test cases. The following is the output of a custom node created by general node development.
$ npm test
> test
> mocha "test/**/*_spec.js"
lower-case Node
✔ should be loaded
✔ should make payload lower case
2 passing (10ms)
Please tell us about your environment:
Node-RED version: v3.0.2
Node.js version: v18.7.0
npm version: v8.15.0
Platform/OS: macOS Venture 13.0.1, MacBook Air M1, 2020
The text was updated successfully, but these errors were encountered:
I have tried to create test cases for custom nodes generated from a subflow but the test using helper module fails. In this issue, I wrote the example case of the error using a
lower-case
node created from subflow which contains a function node to usemsg.payload.toLowerCase();
.What are the steps to reproduce?
Prepare the following files under the
node-red-contrib-example-lower-case
directory. And then, execute thenpm install
andnpm test
commands.What happens?
The
npm test
command outputs the timeout error.What do you expect to happen?
The
npm test
command passes the test cases. The following is the output of a custom node created by general node development.Please tell us about your environment:
The text was updated successfully, but these errors were encountered: