I’m not experienced enough to look at a single block of code and be able to judge a good approach to a test. If you assemble a working example at CodeSandbox, I might be able to play around with a fork and see what works. That would also help a reader see the error being generated.
I started to write some other thoughts, but realized they were based on assumptions about your situation that simply couldn’t be substantiated yet :-)
Please put together a sandbox.
For further actions, you may consider blocking this person and/or reporting abuse
I’m not experienced enough to look at a single block of code and be able to judge a good approach to a test. If you assemble a working example at CodeSandbox, I might be able to play around with a fork and see what works. That would also help a reader see the error being generated.
I started to write some other thoughts, but realized they were based on assumptions about your situation that simply couldn’t be substantiated yet :-)
Please put together a sandbox.