diff options
author | 2023-02-03 12:19:44 -0300 | |
---|---|---|
committer | 2023-02-03 16:19:44 +0100 | |
commit | 45b41d98f50dc9f76a5004a8b3346f393f1a6cb6 (patch) | |
tree | 682baae31d09194e2281d1b100d8b032aaf86ba2 /packages/integrations/cloudflare/test | |
parent | 79fca438e97a5d0f25defd28676835ab3885149b (diff) | |
download | astro-45b41d98f50dc9f76a5004a8b3346f393f1a6cb6.tar.gz astro-45b41d98f50dc9f76a5004a8b3346f393f1a6cb6.tar.zst astro-45b41d98f50dc9f76a5004a8b3346f393f1a6cb6.zip |
fix: use the root of the project as the functions location (#6075)
* fix: use the root of the project as the functions location
* test: add test to check where the functions folder is added
Diffstat (limited to 'packages/integrations/cloudflare/test')
-rw-r--r-- | packages/integrations/cloudflare/test/directory.test.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/integrations/cloudflare/test/directory.test.js b/packages/integrations/cloudflare/test/directory.test.js index 7c299f526..e5b520574 100644 --- a/packages/integrations/cloudflare/test/directory.test.js +++ b/packages/integrations/cloudflare/test/directory.test.js @@ -1,20 +1,21 @@ -import { loadFixture, runCLI } from './test-utils.js'; +import { loadFixture } from './test-utils.js'; import { expect } from 'chai'; -import * as cheerio from 'cheerio'; import cloudflare from '../dist/index.js'; +/** @type {import('./test-utils').Fixture} */ describe('mode: "directory"', () => { - /** @type {import('./test-utils').Fixture} */ let fixture; before(async () => { fixture = await loadFixture({ root: './fixtures/basics/', + output: 'server', adapter: cloudflare({ mode: 'directory' }), }); + await fixture.build(); }); - it('Builds', async () => { - await fixture.build(); + it('generates functions folder inside the project root', async () => { + expect(await fixture.pathExists('../functions')).to.be.true; }); }); |