diff --git a/main/old_test/test.js b/main/old_test/test.js index 7d4f88f..f273f76 100644 --- a/main/old_test/test.js +++ b/main/old_test/test.js @@ -20,6 +20,13 @@ if (process.argv.some((el) => el === 'http2')) { } async function run() { + if ( + process.env.USE_HTTP2 !== 'true' && + process.env.USE_PONYFILL !== 'true' && + process.env.USE_POLYFILL !== 'true' + ) { + await quicheLoaded + } console.log('try connecting to server that does not exist') const badClient = new WebTransport('https://127.0.0.1:49823/echo', { serverCertificateHashes: [ @@ -90,14 +97,6 @@ async function run() { const url = 'https://127.0.0.1:8080/echo' - if ( - process.env.USE_HTTP2 !== 'true' && - process.env.USE_PONYFILL !== 'true' && - process.env.USE_POLYFILL !== 'true' - ) { - await quicheLoaded - } - /** @type {import('../lib/dom').WebTransport | null} */ let client = new WebTransport(url, { serverCertificateHashes: [{ algorithm: 'sha-256', value: certificate.hash }]