Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #6543
Changed
PATCH
toPOST
for invite accept testThis seems like it may have just been an oversight from awhile back. Simple fix.
Replaced
jest-environment-jsdom-global
withjest-environment-jsdom
This wasn't strictly essential but saves an abstraction/package that isn't really required.
quick polyfill of
clearImmediate
clearImmediate
isn't part ofjest-environment-jsdom
(jestjs/jest#11222) anymore so I used the versions from thetimers
package.Removed
mockdate
This was causing some issues due to the way it overwrites the
Date
global.Example: boblauer/MockDate#46
Use
jest.useFakeTimers
insteadJest 27 changed the default behaviour for
jest.useFakeTimers
to themodern
implementation which is based on @sinonjs/fake-timers (formerlylolex
).This was causing timeouts with
nock
not executing responses (see: nock/nock#2200).The
flush
function was updated to fix this by callingjest.runAllTicks
as well as the promise flush.Let me know if you need any more info 馃殌