File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
packages/npm-packages/ruby-wasm-wasi/test-e2e/integrations Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,6 @@ if (!process.env.RUBY_NPM_PACKAGE_ROOT) {
13
13
route . fulfill ( {
14
14
path : path . join ( "./test-e2e/integrations" , relativePath ) ,
15
15
} ) ;
16
- } else if ( relativePath . match ( "redirect_to_error_on_load_twice.rb" ) ) {
17
- route . fulfill ( {
18
- status : 302 ,
19
- headers : {
20
- location : "error_on_load_twice.rb" ,
21
- } ,
22
- } ) ;
23
16
} else if ( fs . existsSync ( mockedPath ) ) {
24
17
route . fulfill ( {
25
18
path : mockedPath ,
@@ -92,13 +85,23 @@ if (!process.env.RUBY_NPM_PACKAGE_ROOT) {
92
85
// In the integration test, response#url returns the URL before the redirect.
93
86
// I do not know the cause. Under investigation.
94
87
test . skip ( "JS::RequireRemote#load identifies by URL after redirect" , async ( {
95
- page,
88
+ page, context
96
89
} ) => {
97
90
// Stop tests immediately when an error occurs in the page.
98
91
page . on ( "pageerror" , ( error ) => {
99
92
throw error ;
100
93
} ) ;
101
94
95
+ // Use the proxy to redirect the request.
96
+ context . route ( / r e d i r e c t / , ( route ) => {
97
+ route . fulfill ( {
98
+ status : 302 ,
99
+ headers : {
100
+ location : "error_on_load_twice.rb" ,
101
+ } ,
102
+ } ) ;
103
+ } ) ;
104
+
102
105
const resolve = await resolveBinding ( page , "checkResolved" ) ;
103
106
await page . goto (
104
107
"https://cdn.jsdelivr.net/npm/ruby-head-wasm-wasi@latest/dist/" ,
You can’t perform that action at this time.
0 commit comments