Can I specify settings.js for node-red-node-test-helper?

I am using node-red-node-test-helper for my test.
Generally it runs OK. But one of my test case needs to add some new configuration in settings.js, and I don't know how to do that. I tried to edit the settings.js under node_modules/node-red, but it doesn't seem to work. Which setting.js does node-red-node-test-helper use by default?

Test Helper does not currently expose the settings object it uses - none of the core nodes we wrote it for needed this capability.

There is a PR open to allow custom settings to be provided. https://github.com/node-red/node-red-node-test-helper/pull/34

I'll try to get that reviewed and a new version published today.

1 Like

I've just published 0.2.3 of node-red-node-test-helper that allows you to provide a custom settings object in the call to helper.init:

helper.init( ... , {functionGlobalContext: {}});

@knolleary many thanks! we will use the latest helper to try.