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) {
1313 route . fulfill ( {
1414 path : path . join ( "./test-e2e/integrations" , relativePath ) ,
1515 } ) ;
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- } ) ;
2316 } else if ( fs . existsSync ( mockedPath ) ) {
2417 route . fulfill ( {
2518 path : mockedPath ,
@@ -92,13 +85,23 @@ if (!process.env.RUBY_NPM_PACKAGE_ROOT) {
9285 // In the integration test, response#url returns the URL before the redirect.
9386 // I do not know the cause. Under investigation.
9487 test . skip ( "JS::RequireRemote#load identifies by URL after redirect" , async ( {
95- page,
88+ page, context
9689 } ) => {
9790 // Stop tests immediately when an error occurs in the page.
9891 page . on ( "pageerror" , ( error ) => {
9992 throw error ;
10093 } ) ;
10194
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+
102105 const resolve = await resolveBinding ( page , "checkResolved" ) ;
103106 await page . goto (
104107 "https://cdn.jsdelivr.net/npm/ruby-head-wasm-wasi@latest/dist/" ,
You can’t perform that action at this time.
0 commit comments