-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
313bf86
commit 5e003dc
Showing
6 changed files
with
46 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { test, expect } from "bun:test"; | ||
import { Window } from "happy-dom"; | ||
test("reproduction", async (): Promise<undefined> => { | ||
expect.assertions(1); | ||
for (let i: number = 0; i < 2; ++i) { | ||
// TODO: have a reproduction of this that doesn't depend on a 10 MB file. | ||
const response: Response = new Response(`<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script | ||
id="base-js" | ||
src="https://www.youtube.com/s/desktop/6ed1dd74/jsbin/desktop_polymer_legacy_browsers.vflset/desktop_polymer_legacy_browsers.js" | ||
nonce="4oKS2biXokC0utrX4MKrsQ"></script> | ||
</head> | ||
</body> | ||
</html>`); | ||
const window: Window = new Window({ url: "http://youtube.com" }); | ||
const localStorage = window.localStorage; | ||
global.window = window; | ||
global.document = window.document; | ||
localStorage.clear(); | ||
document.body.innerHTML = await response.text(); | ||
} | ||
|
||
// This test passes by simply not crashing. | ||
expect().pass(); | ||
}); |
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