[PR #21] [MERGED] feat: Add unit tests #21

Closed
opened 2026-02-25 17:05:45 +11:00 by administrator · 0 comments

📋 Pull Request Information

Original PR: https://github.com/pieartsy/PluralFlux/pull/21
Author: @pieartsy
Created: 2/25/2026
Status: Merged
Merged: 2/25/2026
Merged by: @pieartsy

Base: mainHead: add-tests


📝 Commits (10+)

  • a3caa2d converted import syntax to ES modules
  • 5a39610 got test sort of working (jest set up is not crashing but also not mocking correctly)
  • 5e28cdf adjusted beforeeach/beforeall so more pass
  • 876f948 more correct test setup
  • 5ab0d62 converted import syntax to commonJS
  • a44e274 got test sort of working (jest set up is not crashing but also not mocking correctly)
  • 79d98c3 adjusted beforeeach/beforeall so more pass
  • 0a4bfa5 more correct test setup
  • 321fe7f more correct dockerfile and compose.yaml
  • 35b454b Revert "converted import syntax to commonJS"

📊 Changes

18 files changed (+1747 additions, -856 deletions)

View changed files

📝 .dockerignore (+1 -1)
.env.jest (+2 -0)
📝 README.md (+1 -1)
📝 package-lock.json (+165 -135)
📝 package.json (+5 -2)
📝 src/bot.js (+41 -28)
📝 src/commands.js (+77 -45)
📝 src/enums.js (+5 -4)
📝 src/helpers/importHelper.js (+3 -3)
📝 src/helpers/memberHelper.js (+256 -341)
📝 src/helpers/messageHelper.js (+3 -8)
src/helpers/utils.js (+29 -0)
tests/bot.test.js (+322 -0)
tests/commands.test.js (+183 -0)
tests/helpers/importHelper.test.js (+100 -0)
📝 tests/helpers/memberHelper.test.js (+534 -279)
📝 tests/helpers/messageHelper.test.js (+1 -9)
tests/helpers/utils.test.js (+19 -0)

📄 Description

Tests are mostly complete (though some are failing -- to be fixed in the async/await refactor.

Also refactored, fixed bugs found while testing, and added ability to type pf;m instead of pf;member.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pieartsy/PluralFlux/pull/21 **Author:** [@pieartsy](https://github.com/pieartsy) **Created:** 2/25/2026 **Status:** ✅ Merged **Merged:** 2/25/2026 **Merged by:** [@pieartsy](https://github.com/pieartsy) **Base:** `main` ← **Head:** `add-tests` --- ### 📝 Commits (10+) - [`a3caa2d`](https://github.com/pieartsy/PluralFlux/commit/a3caa2dc42b5d76c5c8950a77dcc574edc3ac76b) converted import syntax to ES modules - [`5a39610`](https://github.com/pieartsy/PluralFlux/commit/5a39610547228a6aea22a2e2157fe1ac58ea8935) got test sort of working (jest set up is not crashing but also not mocking correctly) - [`5e28cdf`](https://github.com/pieartsy/PluralFlux/commit/5e28cdfd0167f5df966ae51637b54ed7c782d610) adjusted beforeeach/beforeall so more pass - [`876f948`](https://github.com/pieartsy/PluralFlux/commit/876f9486ad2cb3850ffa094e342981e12770610c) more correct test setup - [`5ab0d62`](https://github.com/pieartsy/PluralFlux/commit/5ab0d62bdb187f4d57842f0df28b654b4f0bcee6) converted import syntax to commonJS - [`a44e274`](https://github.com/pieartsy/PluralFlux/commit/a44e2745c5cd06284dc8e792404b011933b23305) got test sort of working (jest set up is not crashing but also not mocking correctly) - [`79d98c3`](https://github.com/pieartsy/PluralFlux/commit/79d98c36181acce4093ce38cc9d24a1352917fff) adjusted beforeeach/beforeall so more pass - [`0a4bfa5`](https://github.com/pieartsy/PluralFlux/commit/0a4bfa59adc6c5f19f23b720f6254f3bbd0b82d1) more correct test setup - [`321fe7f`](https://github.com/pieartsy/PluralFlux/commit/321fe7f0a911fa83a958a9c25140a5f0cde967ab) more correct dockerfile and compose.yaml - [`35b454b`](https://github.com/pieartsy/PluralFlux/commit/35b454bc80243780b3187f9b4f70881daa45176f) Revert "converted import syntax to commonJS" ### 📊 Changes **18 files changed** (+1747 additions, -856 deletions) <details> <summary>View changed files</summary> 📝 `.dockerignore` (+1 -1) ➕ `.env.jest` (+2 -0) 📝 `README.md` (+1 -1) 📝 `package-lock.json` (+165 -135) 📝 `package.json` (+5 -2) 📝 `src/bot.js` (+41 -28) 📝 `src/commands.js` (+77 -45) 📝 `src/enums.js` (+5 -4) 📝 `src/helpers/importHelper.js` (+3 -3) 📝 `src/helpers/memberHelper.js` (+256 -341) 📝 `src/helpers/messageHelper.js` (+3 -8) ➕ `src/helpers/utils.js` (+29 -0) ➕ `tests/bot.test.js` (+322 -0) ➕ `tests/commands.test.js` (+183 -0) ➕ `tests/helpers/importHelper.test.js` (+100 -0) 📝 `tests/helpers/memberHelper.test.js` (+534 -279) 📝 `tests/helpers/messageHelper.test.js` (+1 -9) ➕ `tests/helpers/utils.test.js` (+19 -0) </details> ### 📄 Description Tests are mostly complete (though some are failing -- to be fixed in the async/await refactor. Also refactored, fixed bugs found while testing, and added ability to type `pf;m` instead of `pf;member`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
administrator added the pull-request label 2026-02-25 17:05:45 +11:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/PluralFlux#21