X Tutup
Skip to content

Commit 5b6489e

Browse files
authored
Remove AbortController test mock (#3506)
This library includes an `AbortController` test mock, which doesn't work in places that expect a real one. For example, I was writing an unrelated test that tried to cancel a `fetch()` which failed because the `AbortController`'s `signal` property was invalid. Because [`AbortController` is in all supported Node versions][0], we can safely remove this mock and rely on the real thing. This should only affect tests. [0]: https://developer.mozilla.org/en-US/docs/Web/API/AbortController#browser_compatibility
1 parent 7806111 commit 5b6489e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

setup-jest.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,3 @@ NativeModules.RNMBXChangeLineOffsetsShapeAnimatorModule = {
206206
NativeModules.RNMBXLogging = nativeModule({
207207
setLogLevel: jest.fn(),
208208
});
209-
210-
// Mock for global AbortController
211-
global.AbortController = class {
212-
signal = 'test-signal';
213-
abort = jest.fn();
214-
};

0 commit comments

Comments
 (0)
X Tutup