[PR #22] refactor: Removing then/catch from async/await calls #22

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

📋 Pull Request Information

Original PR: https://github.com/pieartsy/PluralFlux/pull/22
Author: @pieartsy
Created: 2/25/2026
Status: 🔄 Open

Base: mainHead: refactor-async-await


📝 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 (+886 additions, -910 deletions)

View changed files

📝 package-lock.json (+1 -76)
📝 package.json (+1 -2)
📝 src/bot.js (+14 -15)
📝 src/commands.js (+37 -25)
📝 src/database.js (+14 -12)
📝 src/enums.js (+2 -1)
📝 src/helpers/importHelper.js (+37 -22)
📝 src/helpers/memberHelper.js (+59 -73)
📝 src/helpers/messageHelper.js (+1 -2)
📝 src/helpers/utils.js (+13 -5)
📝 src/helpers/webhookHelper.js (+12 -19)
📝 tests/bot.test.js (+94 -125)
📝 tests/commands.test.js (+123 -96)
📝 tests/helpers/importHelper.test.js (+36 -33)
📝 tests/helpers/memberHelper.test.js (+219 -267)
📝 tests/helpers/messageHelper.test.js (+16 -15)
📝 tests/helpers/utils.test.js (+51 -3)
📝 tests/helpers/webhookHelper.test.js (+156 -119)

📄 Description

Removed unnecessary then/catch from async/await calls to simplify code. Also adding more tests


🔄 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/22 **Author:** [@pieartsy](https://github.com/pieartsy) **Created:** 2/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `refactor-async-await` --- ### 📝 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** (+886 additions, -910 deletions) <details> <summary>View changed files</summary> 📝 `package-lock.json` (+1 -76) 📝 `package.json` (+1 -2) 📝 `src/bot.js` (+14 -15) 📝 `src/commands.js` (+37 -25) 📝 `src/database.js` (+14 -12) 📝 `src/enums.js` (+2 -1) 📝 `src/helpers/importHelper.js` (+37 -22) 📝 `src/helpers/memberHelper.js` (+59 -73) 📝 `src/helpers/messageHelper.js` (+1 -2) 📝 `src/helpers/utils.js` (+13 -5) 📝 `src/helpers/webhookHelper.js` (+12 -19) 📝 `tests/bot.test.js` (+94 -125) 📝 `tests/commands.test.js` (+123 -96) 📝 `tests/helpers/importHelper.test.js` (+36 -33) 📝 `tests/helpers/memberHelper.test.js` (+219 -267) 📝 `tests/helpers/messageHelper.test.js` (+16 -15) 📝 `tests/helpers/utils.test.js` (+51 -3) 📝 `tests/helpers/webhookHelper.test.js` (+156 -119) </details> ### 📄 Description Removed unnecessary then/catch from async/await calls to simplify code. Also adding more tests --- <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#22