diff options
Diffstat (limited to 'packages/integrations/cloudflare/test/basics.test.js')
-rw-r--r-- | packages/integrations/cloudflare/test/basics.test.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/integrations/cloudflare/test/basics.test.js b/packages/integrations/cloudflare/test/basics.test.js index 726a19fc6..eb4509da1 100644 --- a/packages/integrations/cloudflare/test/basics.test.js +++ b/packages/integrations/cloudflare/test/basics.test.js @@ -14,20 +14,22 @@ describe('Basic app', () => { }); await fixture.build(); - cli = await runCLI('./fixtures/basics/', { silent: true, port: 8789 }); - await cli.ready.catch((e) => { - console.log(e); - // if fail to start, skip for now as it's very flaky - this.skip(); + cli = await runCLI('./fixtures/basics/', { + silent: true, + onTimeout: (ex) => { + console.log(ex); + // if fail to start, skip for now as it's very flaky + this.skip(); + }, }); }); after(async () => { - await cli.stop(); + await cli?.stop(); }); it('can render', async () => { - let res = await fetch(`http://127.0.0.1:8789/`); + let res = await fetch(`http://127.0.0.1:${cli.port}/`); expect(res.status).to.equal(200); let html = await res.text(); let $ = cheerio.load(html); |