We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f11a9e commit a4b2363Copy full SHA for a4b2363
packages/snaps-utils/src/base64.test.ts
@@ -51,6 +51,21 @@ describe('encodeBase64', () => {
51
);
52
expect(await encodeBase64(vfile)).toBe('eyJmb28iOiJiYXIifQ==');
53
});
54
+
55
+ it('does not use optimization when running in React Native', async () => {
56
+ Object.defineProperty(globalThis, 'FileReader', {
57
+ value: MockFileReader,
58
+ });
59
60
+ Object.defineProperty(globalThis, 'navigator', {
61
+ value: { product: 'ReactNative' },
62
63
64
+ const vfile = new VirtualFile(
65
+ stringToBytes(JSON.stringify({ foo: 'bar' })),
66
+ );
67
+ expect(await encodeBase64(vfile)).toBe('eyJmb28iOiJiYXIifQ==');
68
69
70
71
describe('decodeBase64', () => {
0 commit comments