Commit Graph

123 Commits

Author SHA1 Message Date
Aster Fialla
264c3e19fd removing some unused imports in messageHelper 2026-02-23 08:44:50 -05:00
Aster Fialla
0a1652f243 updated docstrings 2026-02-23 08:02:30 -05:00
Aster Fialla
71c8736a38 added to docstring 2026-02-23 00:18:57 -05:00
Aster Fialla
d9530a2ccf structure and test revamp for memberHelper 2026-02-23 00:18:14 -05:00
Aster Fialla
be24034d48 updating tests and memberHelper to try and make parseMemberCommand less bloated/broken (not working ATM) 2026-02-22 21:40:42 -05:00
Aster Fialla
c3e7bf4433 updated enums 2026-02-22 18:48:52 -05:00
Aster Fialla
7dae9f52b1 fixed call to getMemberInfo to not include authorId 2026-02-22 18:32:47 -05:00
Aster Fialla
630ce7888c adjusted parsing logic to not try and call member when none exists (due to "new" command) 2026-02-22 18:06:18 -05:00
Aster Fialla
b88b9252be forgot to import enums into utils 2026-02-22 17:09:02 -05:00
Aster Fialla
fa4ca779ee accidental error with memberHelper not allowing pf;member fixed 2026-02-22 11:52:51 -05:00
Aster Fialla
eb7340faf7 finished relevant tests for memberHelper 2026-02-22 11:24:57 -05:00
Aster Fialla
d4adbc028a typo not importing utils right 2026-02-22 09:54:01 -05:00
Aster Fialla
57336b4e58 added to enums 2026-02-21 23:05:59 -05:00
Aster Fialla
71803fd10c made utils file 2026-02-21 23:05:15 -05:00
Aster Fialla
cc8cb6e925 write more tests for addNewMember 2026-02-21 23:05:01 -05:00
Aster Fialla
a797e9e06d write more tests for parseMemberCommand 2026-02-21 21:37:57 -05:00
Aster Fialla
4146591c90 figured out issue (was missing return value) 2026-02-21 20:09:39 -05:00
Aster Fialla
56d7f7d1fa call getMemberCommandInfo in parseMemberCommand 2026-02-20 11:33:16 -05:00
Aster Fialla
8f6ae668b0 update getMemberCommandInfo
# Conflicts:
#	src/helpers/memberHelper.js
2026-02-20 11:31:54 -05:00
Aster Fialla
211a705f31 update enums 2026-02-20 11:29:28 -05:00
Aster Fialla
0bca359b7f trying to get refactored memberhelper to pass tests -_- 2026-02-20 11:28:28 -05:00
Aster Fialla
932fc9c967 update getMemberCommandInfo 2026-02-20 11:03:50 -05:00
Aster Fialla
cd01473121 update enums 2026-02-20 11:00:57 -05:00
Aster Fialla
c133ee2c42 refactored memberHelper 2026-02-20 11:00:21 -05:00
8fc590c062 feat: add tests and other such features (#3)
* converted import syntax to ES modules

removed unused methods

* got test sort of working (jest set up is not crashing but also not mocking correctly)

* adjusted beforeeach/beforeall so more pass

* more correct test setup

* converted import syntax to commonJS

removed unused methods

* got test sort of working (jest set up is not crashing but also not mocking correctly)

* adjusted beforeeach/beforeall so more pass

* more correct test setup

* more correct dockerfile and compose.yaml

* Revert "converted import syntax to commonJS"

This reverts commit 5ab0d62b

* updated jest to sort of work with es6

* separating out enum return from method return

* mostly working except for the weirdest error

* nevermind it wasn't actually working, gonna move on for now

* added babel to convert es modules to cjs

* finally figured out issue with tests (referencing the method directly in the test.each calls the real method not the mock in beforeEach())

* setup fixed more

* added error handling parseMemberCommand test

* renamed db to database
more tests and fixing logic for memberhelper

* upgraded fluxer.js

* moved import to helpers folder

* moved import to helpers folder

* more tests for member helper

* think i fixed weird error with webhook sending error when a user has no members

* simplified sendMessageAsAttachment

* added return to addFullMember so that addNewMember can reference it properly in strings

* test setup for messagehelper and webhookhelper

* readded line i shouldn't have removed in sendMessageAsMember

* fixed test and logic

* added test for memberHelper

* updated sendMessageAsAttachment to returnBufferFromText and updated commands/webhookHelper accordingly

* added tests for parseProxyTags and updated logic

* added "return" so tests dont terminate on failure and deleted env.jest

* finished tests for messageHelper!

* more cases for messageHelper just in case

* updating docstring for messageHelper parseProxyTags

* more tests for webhookhelper

* deleted extra file added during merge

* removed confusing brackets from enum docs

* finally mocking correctly

* adding more cases to messageHelper tests

* updating enums

* removed error response when proxy is sent without content

* , updated tests for webhookHelper and removed error response when proxy is sent without content

* added debounce to count guilds properly

* added todo note

* added tests for updateDisplayName

* edited help message trigger for updatePropic

* update message helper test to include space case

* update bot to suppress errors from API

* fixed bug for import not sending help text, added help text if you type a unrecognized command

* updated to be enum

* updated member helper and tests

* edit enums, tweak import content command

* removed unnecessary await and console.log

* made it easier to make a member

* added nicer error listing to importHelper

* updated documentation

* Merge branch 'main' of https://github.com/pieartsy/PluralFlux into add-tests

---------

Co-authored-by: Aster Fialla <asterfialla@gmail.com>
2026-02-19 21:45:10 -05:00
Aster Fialla
a30d408c02 Merge branch 'main' of https://github.com/pieartsy/PluralFlux into add-tests 2026-02-19 21:41:59 -05:00
Aster Fialla
4d3db8c001 updated documentation 2026-02-19 21:38:10 -05:00
Aster Fialla
eb6c60618b added nicer error listing to importHelper 2026-02-19 21:38:03 -05:00
Aster Fialla
b64ba6e787 made it easier to make a member 2026-02-19 21:36:19 -05:00
Aster Fialla
d640322392 removed unnecessary await and console.log 2026-02-19 20:32:35 -05:00
Aster Fialla
b1a29fd3ff edit enums, tweak import content command 2026-02-19 20:30:55 -05:00
Aster Fialla
e7198230a7 updated member helper and tests 2026-02-19 20:08:26 -05:00
Aster Fialla
fad6d42ee2 updated to be enum 2026-02-19 19:32:37 -05:00
Aster Fialla
c4c6ad0fdd fixed bug for import not sending help text, added help text if you type a unrecognized command 2026-02-19 19:31:56 -05:00
Aster Fialla
1e2724bbfb update bot to suppress errors from API 2026-02-19 19:13:54 -05:00
Aster Fialla
7a3b8c1994 edited help message trigger for updatePropic 2026-02-19 01:45:43 -05:00
Aster Fialla
2e0a8adec5 added tests for updateDisplayName 2026-02-19 01:31:38 -05:00
Aster Fialla
6eb9fef376 added debounce to count guilds properly 2026-02-19 00:52:06 -05:00
Aster Fialla
9dab429d0d , updated tests for webhookHelper and removed error response when proxy is sent without content 2026-02-19 00:51:33 -05:00
Aster Fialla
f9199f8477 removed error response when proxy is sent without content 2026-02-19 00:48:57 -05:00
Aster Fialla
a7cd4e96f0 updating enums 2026-02-19 00:20:53 -05:00
Aster Fialla
21efbccfd7 adding more cases to messageHelper tests 2026-02-19 00:20:46 -05:00
Aster Fialla
d33c3213f3 removed confusing brackets from enum docs 2026-02-18 21:20:56 -05:00
Aster Fialla
9d5493e8ab Merge remote-tracking branch 'origin/add-tests' into add-tests
# Conflicts:
#	src/bot.js
#	src/commands.js
#	src/database.js
#	src/helpers/importHelper.js
#	src/helpers/memberHelper.js
#	src/helpers/messageHelper.js
#	src/helpers/webhookHelper.js
2026-02-18 21:03:44 -05:00
Aster Fialla
fc1c463696 more tests for webhookhelper 2026-02-18 17:14:04 -05:00
Aster Fialla
1bba8099e9 updating docstring for messageHelper parseProxyTags 2026-02-18 16:29:08 -05:00
Aster Fialla
da9a3d2c8a finished tests for messageHelper! 2026-02-18 12:37:39 -05:00
Aster Fialla
223292c2d3 added tests for parseProxyTags and updated logic 2026-02-18 10:17:08 -05:00
Aster Fialla
400e40a405 updated sendMessageAsAttachment to returnBufferFromText and updated commands/webhookHelper accordingly 2026-02-18 09:19:44 -05:00
Aster Fialla
e16694ac2d fixed test and logic 2026-02-18 08:47:37 -05:00