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

**URL:** <https://discourse.nodered.org/t/can-i-specify-settings-js-for-node-red-node-test-helper/13064>\
**Category:** General\
**Created:** [9 July 2019 08:25 UTC](https://discourse.nodered.org/t/can-i-specify-settings-js-for-node-red-node-test-helper/13064 "2019-07-09T08:25:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fangzhu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fangzhu/32/5796_2.png) [@fangzhu](https://discourse.nodered.org/u/fangzhu)\
**Post date:** [9 July 2019 08:25 UTC](https://discourse.nodered.org/t/can-i-specify-settings-js-for-node-red-node-test-helper/13064/1 "2019-07-09T08:25:50Z")

</div>

I am using **[node-red-node-test-helper](https://github.com/node-red/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?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [9 July 2019 09:34 UTC](https://discourse.nodered.org/t/can-i-specify-settings-js-for-node-red-node-test-helper/13064/2 "2019-07-09T09:34:13Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [9 July 2019 10:16 UTC](https://discourse.nodered.org/t/can-i-specify-settings-js-for-node-red-node-test-helper/13064/3 "2019-07-09T10:16:40Z")

</div>

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`:

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

```

---

<div class="post-metadata">

**Author:** ![fangzhu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fangzhu/32/5796_2.png) [@fangzhu](https://discourse.nodered.org/u/fangzhu)\
**Post date:** [9 July 2019 11:20 UTC](https://discourse.nodered.org/t/can-i-specify-settings-js-for-node-red-node-test-helper/13064/4 "2019-07-09T11:20:26Z")

</div>

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