# How to Run Unit Tests for My Node-RED Custom Node?

**URL:** <https://discourse.nodered.org/t/how-to-run-unit-tests-for-my-node-red-custom-node/93993>\
**Category:** Developing Nodes\
**Created:** [18 December 2024 11:58 UTC](https://discourse.nodered.org/t/how-to-run-unit-tests-for-my-node-red-custom-node/93993 "2024-12-18T11:58:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nandhini-Subramaniya](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nandhini-subramaniya/32/92882_2.png) [@Nandhini-Subramaniya](https://discourse.nodered.org/u/Nandhini-Subramaniya)\
**Post date:** [18 December 2024 11:58 UTC](https://discourse.nodered.org/t/how-to-run-unit-tests-for-my-node-red-custom-node/93993/1 "2024-12-18T11:58:54Z")

</div>

I’m working on creating a custom Node-RED node following the [Creating Your First Node](https://nodered.org/docs/creating-nodes/first-node#testing-your-node-in-node-red) guide from the official documentation.

I have successfully created the required files:

1. `lower-case.js` (the node definition)
2. `lower-case.html` (for the node’s editor UI)
3. `test/lower-case_spec.js` (for unit testing using `node-red-node-test-helper`)

I followed the steps to write my unit test using the `node-red-node-test-helper` and the sample `lower-case_spec.js` file.  
I’m trying to run the tests, but I’m not sure about the exact command or steps.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [18 March 2025 11:59 UTC](https://discourse.nodered.org/t/how-to-run-unit-tests-for-my-node-red-custom-node/93993/2 "2025-03-18T11:59:14Z")

</div>

Closed on 18 March 2025 11:59 UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
