Created
October 19, 2023 04:06
-
-
Save mizchi/13996e3f7ad979c67f1682deb2271a3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {test, expect} from 'vitest'; | |
test("nested", async () => { | |
const a = 'export default Math.random()'; | |
const b = `export default () => import('data:text/javascript;base64,${btoa(a)}')`; | |
const bmod = await import(`data:text/javascript;base64,${btoa(b)}`); | |
const amod = await import(`data:text/javascript;base64,${btoa(a)}`); | |
expect(await bmod.default()).not.toBe(await amod.default); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment