Skip to content

Commit 8e16042

Browse files
committed
test(browser-sdk): remove crypto runtime assertion
1 parent 82c4962 commit 8e16042

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

‎packages/browser-sdk/test/reactNativeRuntime.test.ts‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const logger = {
1010
};
1111

1212
let documentDescriptor: PropertyDescriptor | undefined;
13-
let cryptoDescriptor: PropertyDescriptor | undefined;
1413

1514
function hideDocumentGlobal() {
1615
documentDescriptor = Object.getOwnPropertyDescriptor(globalThis, "document");
@@ -27,32 +26,15 @@ function restoreDocumentGlobal() {
2726
}
2827
}
2928

30-
function hideWebCryptoGlobal() {
31-
cryptoDescriptor = Object.getOwnPropertyDescriptor(globalThis, "crypto");
32-
Object.defineProperty(globalThis, "crypto", {
33-
configurable: true,
34-
value: {},
35-
});
36-
}
37-
38-
function restoreWebCryptoGlobal() {
39-
if (cryptoDescriptor) {
40-
Object.defineProperty(globalThis, "crypto", cryptoDescriptor);
41-
cryptoDescriptor = undefined;
42-
}
43-
}
44-
4529
afterEach(() => {
4630
restoreDocumentGlobal();
47-
restoreWebCryptoGlobal();
4831
vi.restoreAllMocks();
4932
vi.resetModules();
5033
});
5134

5235
describe("React Native runtime", () => {
5336
test("initializes pubsub without document when an SSE transport is provided", async () => {
5437
hideDocumentGlobal();
55-
hideWebCryptoGlobal();
5638
vi.resetModules();
5739

5840
const closeChannel = vi.fn();

0 commit comments

Comments
 (0)