-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Showing
3 changed files
with
32 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
import { expect, test, vi } from 'vitest' | ||
import { browserLogs } from '~utils' | ||
import { browserLogs, page, serverLogs } from '~utils' | ||
|
||
test('proxy-bypass', async () => { | ||
await vi.waitFor(() => { | ||
expect(browserLogs.join('\n')).toContain('status of 404 (Not Found)') | ||
}) | ||
}) | ||
|
||
test('async-proxy-bypass', async () => { | ||
const content = await page.frame('async-response').content() | ||
expect(content).toContain('Hello after 4 ms (async timeout)') | ||
}) | ||
|
||
test('async-proxy-bypass-with-error', async () => { | ||
await vi.waitFor(() => { | ||
expect(serverLogs.join('\n')).toContain('bypass error') | ||
}) | ||
}) |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
root app<br /> | ||
<iframe src="/nonExistentApp" style="border: 0"></iframe> | ||
<iframe src="/asyncResponse" name="async-response"></iframe> | ||
<iframe src="/asyncThrowingError"></iframe> |
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