summaryrefslogtreecommitdiff
path: root/packages/integrations/cloudflare/test
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/cloudflare/test')
-rw-r--r--packages/integrations/cloudflare/test/cf.test.js5
-rw-r--r--packages/integrations/cloudflare/test/test-utils.js23
2 files changed, 19 insertions, 9 deletions
diff --git a/packages/integrations/cloudflare/test/cf.test.js b/packages/integrations/cloudflare/test/cf.test.js
index e6c2ccd0b..b671f41e9 100644
--- a/packages/integrations/cloudflare/test/cf.test.js
+++ b/packages/integrations/cloudflare/test/cf.test.js
@@ -31,7 +31,10 @@ describe('Cf metadata and caches', () => {
let html = await res.text();
let $ = cheerio.load(html);
- expect($('#cf').text()).to.contain('city', `Expected "city" to exist in runtime, but got ${$('#cf').text()}`);
+ expect($('#cf').text()).to.contain(
+ 'city',
+ `Expected "city" to exist in runtime, but got ${$('#cf').text()}`
+ );
expect($('#hasCache').text()).to.equal('true');
});
});
diff --git a/packages/integrations/cloudflare/test/test-utils.js b/packages/integrations/cloudflare/test/test-utils.js
index 6a657a0fc..61067c538 100644
--- a/packages/integrations/cloudflare/test/test-utils.js
+++ b/packages/integrations/cloudflare/test/test-utils.js
@@ -33,7 +33,17 @@ export async function runCLI(basePath, { silent, port }) {
}
const script = fileURLToPath(new URL(`${basePath}/dist/_worker.js`, import.meta.url));
- const p = spawn('node', [wranglerPath, 'dev', script, '--port', port, '--log-level', 'info', '--persist-to', `${basePath}/.wrangler/state`]);
+ const p = spawn('node', [
+ wranglerPath,
+ 'dev',
+ script,
+ '--port',
+ port,
+ '--log-level',
+ 'info',
+ '--persist-to',
+ `${basePath}/.wrangler/state`,
+ ]);
p.stderr.setEncoding('utf-8');
p.stdout.setEncoding('utf-8');
@@ -41,13 +51,10 @@ export async function runCLI(basePath, { silent, port }) {
const timeout = 10_000;
const ready = new Promise(async (resolve, reject) => {
- const failed = setTimeout(
- () => {
- p.kill();
- reject(new Error(`Timed out starting the wrangler CLI`));
- },
- timeout
- );
+ const failed = setTimeout(() => {
+ p.kill();
+ reject(new Error(`Timed out starting the wrangler CLI`));
+ }, timeout);
(async function () {
for (const msg of p.stderr) {