Commit Graph

28 Commits

Author SHA1 Message Date
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
51ada567ce made bot search and query lowercase instead of only applying to uppercase 2026-02-16 13:30:57 -05:00
Aster Fialla
4ea0a777af actually fixed proxy query 2026-02-16 10:56:40 -05:00
Aster Fialla
559da55176 edited addFullMember to throw error if member was not added successfully 2026-02-16 10:36:31 -05:00
Aster Fialla
32adf7b6ef move list --help check to parseMemberCommand 2026-02-16 09:34:07 -05:00
Aster Fialla
1db4ab37dc removed nonexistent e 2026-02-16 00:42:15 -05:00
Aster Fialla
fa0de17724 edited member helper to notify only 25 members are supported currently in list 2026-02-16 00:40:40 -05:00
Aster Fialla
58912f382c edited remove to not "remove" nonexistent members 2026-02-16 00:22:55 -05:00
Aster Fialla
375601cca7 added --help to list 2026-02-16 00:21:46 -05:00
Aster Fialla
e67a10fa79 allows invalid propic to still be imported 2026-02-16 00:16:38 -05:00
Aster Fialla
8f70960079 removed some overzealous error handling 2026-02-15 16:48:22 -05:00
Aster Fialla
9bff32456c changed error handling to not return error when database returns null as sometimes we want that 2026-02-15 15:57:08 -05:00
Aster Fialla
ff84a637b2 edited enum reference to ADD 2026-02-15 02:17:05 -05:00
Aster Fialla
8762e41a0a changed add command back to new because dang. 2026-02-15 02:12:59 -05:00
Aster Fialla
2e63532dc7 removed "cause" parameter for error 2026-02-15 01:17:06 -05:00
Aster Fialla
5c1d974246 got images working for pluralkit import! 2026-02-15 01:17:06 -05:00
Aster Fialla
dedd50adfc More simplified approach to loading images 2026-02-15 01:17:06 -05:00
Aster Fialla
d512e11682 WIP import. sort of working except error handling and message is not, and can't convert images 2026-02-15 01:17:06 -05:00
Aster Fialla
be864a4d1b fixed additional argument in thens 2026-02-15 01:17:05 -05:00
Aster Fialla
7264fe0b1c fixed typo in thens 2026-02-14 22:40:43 -05:00
Aster Fialla
33ddc58c41 sequelize doesn't return exceptions when you query nothing so fixed the await handlers on those 2026-02-14 22:39:56 -05:00
Aster Fialla
5c6b76b59b made setexpirationwarning not async 2026-02-14 22:15:49 -05:00
Aster Fialla
9919e8c4b1 adjusting attachment arguments to work 2026-02-14 22:15:49 -05:00
Aster Fialla
70ee8180ab adjusting member helper logic 2026-02-14 22:15:49 -05:00
Aster Fialla
647474e2c2 adjusted errors in embed builder 2026-02-14 22:15:49 -05:00
Aster Fialla
83a2497ff4 updated imports and docstrings 2026-02-14 22:15:49 -05:00
Aster Fialla
89fe2c70b2 put braces around throw e 2026-02-14 22:15:49 -05:00
Aster Fialla
3d36e6c9fc hopefully correct error handling for real 2026-02-14 22:15:49 -05:00