# \#node-red-node-test-helper

**URL:** https://discourse.nodered.org/tag/node-red-node-test-helper/44.md

[Latest](https://discourse.nodered.org/latest.md) · [Categories](https://discourse.nodered.org/categories.md) · [Tags](https://discourse.nodered.org/tags.md)

---

## [Mocking external API call in custom node with node-red-node-test-helper](https://discourse.nodered.org/t/mocking-external-api-call-in-custom-node-with-node-red-node-test-helper/85584)

<div class="topic-metadata">

**Author:** [@Matty](https://discourse.nodered.org/u/Matty)\
**Replies:** 2\
**Last updated:** [16 February 2024 11:48 UTC](https://discourse.nodered.org/t/mocking-external-api-call-in-custom-node-with-node-red-node-test-helper/85584 "2024-02-16T11:48:30Z")

</div>

Hi, I'm currently tackling the testing of my custom Node-RED node, which involves making an external asynchronous API request using Axios to fetch data. Once the data is retrieved, it's attached to the message payload. …

---

## [helper.getNode return null](https://discourse.nodered.org/t/helper-getnode-return-null/83833)

<div class="topic-metadata">

**Author:** [@Zafar](https://discourse.nodered.org/u/Zafar)\
**Replies:** 4\
**Last updated:** [19 December 2023 15:20 UTC](https://discourse.nodered.org/t/helper-getnode-return-null/83833 "2023-12-19T15:20:04Z")

</div>

Hi all, I am trying to develop unit test for my node-red flows. However i am facing issue with helper.getNode() function. It returns null after passing node\_id. These node id's are correctly retrieved using loadFlowFi…

---

## [Mocking a dependent library in a UnitTest](https://discourse.nodered.org/t/mocking-a-dependent-library-in-a-unittest/82728)

<div class="topic-metadata">

**Author:** [@Stwissel](https://discourse.nodered.org/u/Stwissel)\
**Replies:** 3\
**Last updated:** [22 November 2023 12:05 UTC](https://discourse.nodered.org/t/mocking-a-dependent-library-in-a-unittest/82728 "2023-11-22T12:05:50Z")

</div>

I'm developing a node that uses a library to call out to an external system. To unit test I need to mock it. What do I do? My node is roughly like this: const backend = require('./theDarkSide\`); module.exports = functio…

---

## [How to change font size of Table Data in Node Red?](https://discourse.nodered.org/t/how-to-change-font-size-of-table-data-in-node-red/79252)

<div class="topic-metadata">

**Author:** [@techylax](https://discourse.nodered.org/u/techylax)\
**Replies:** 7\
**Last updated:** [20 June 2023 15:26 UTC](https://discourse.nodered.org/t/how-to-change-font-size-of-table-data-in-node-red/79252 "2023-06-20T15:26:07Z")

</div>

Hello everyone, I'm new to Node-RED and I'm currently facing a challenge with adjusting the font size in my table data. The HMI UI I'm working on lacks optimization, and I've made several attempts to resolve this issue …

---

## [How to test flows and subflows](https://discourse.nodered.org/t/how-to-test-flows-and-subflows/78545)

<div class="topic-metadata">

**Author:** [@mradvanyi](https://discourse.nodered.org/u/mradvanyi)\
**Replies:** 0\
**Last updated:** [19 May 2023 14:44 UTC](https://discourse.nodered.org/t/how-to-test-flows-and-subflows/78545 "2023-05-19T14:44:35Z")

</div>

I would like to unit test my Node-RED implementation, specifically Flows and the Subflows in the flows. I'm looking for a non-UI-based Junit test stile testing system, which I can automate. I already tested node-red-no…

---

## [Node unittests pass with strange warning](https://discourse.nodered.org/t/node-unittests-pass-with-strange-warning/75162)

<div class="topic-metadata">

**Author:** [@kakyoism](https://discourse.nodered.org/u/kakyoism)\
**Replies:** 1\
**Last updated:** [16 February 2023 03:51 UTC](https://discourse.nodered.org/t/node-unittests-pass-with-strange-warning/75162 "2023-02-16T03:51:53Z")

</div>

I understand that this may be more or less a mixture of JEST and NR issue. But I just hope someone may shed some light on it. Setup OS: macOS JEST version: $ jest --version 29.4.2 Goal npm install -g node-red npm in…

---

## [Node-red-node-test-helper does not support multiple upstream output ports?](https://discourse.nodered.org/t/node-red-node-test-helper-does-not-support-multiple-upstream-output-ports/73395)

<div class="topic-metadata">

**Author:** [@kakyoism](https://discourse.nodered.org/u/kakyoism)\
**Replies:** 4\
**Last updated:** [9 January 2023 10:52 UTC](https://discourse.nodered.org/t/node-red-node-test-helper-does-not-support-multiple-upstream-output-ports/73395 "2023-01-09T10:52:12Z")

</div>

Repro define a node myNode, with multiple output ports at the end of its node.on('input', ...), call node.send(\[msg1, msg2, ...\]); hook this node up with node-red-node-test-helper, like this let flow = \[ { id: 'n1', …

---

## [Unittest node helper and npm dependency issues](https://discourse.nodered.org/t/unittest-node-helper-and-npm-dependency-issues/72928)

<div class="topic-metadata">

**Author:** [@kakyoism](https://discourse.nodered.org/u/kakyoism)\
**Replies:** 1\
**Last updated:** [3 January 2023 06:33 UTC](https://discourse.nodered.org/t/unittest-node-helper-and-npm-dependency-issues/72928 "2023-01-03T06:33:42Z")

</div>

I'm facing a weird npm dependency issue when trying to install node-red-node-test-helper with custom nodes and a globally installed Node-RED v2.0.5. The expected dependency situation is like this: All custom nodes sha…

---

## [Need help debugging a unittest](https://discourse.nodered.org/t/need-help-debugging-a-unittest/72413)

<div class="topic-metadata">

**Author:** [@kakyoism](https://discourse.nodered.org/u/kakyoism)\
**Replies:** 9\
**Last updated:** [23 December 2022 09:23 UTC](https://discourse.nodered.org/t/need-help-debugging-a-unittest/72413 "2022-12-23T09:23:19Z")

</div>

I build a custom node and want to unittest it using node-red-node-test-helper. I first make a custom flow in Node-RED and exported it. Then I follow the examples to turn that flow json object into a pure node array. Fin…
