2023-02-03 15:19:44 +00:00
|
|
|
import { loadFixture } from './test-utils.js';
|
2023-01-30 19:50:44 +00:00
|
|
|
import { expect } from 'chai';
|
|
|
|
import cloudflare from '../dist/index.js';
|
|
|
|
|
2023-02-03 15:19:44 +00:00
|
|
|
/** @type {import('./test-utils').Fixture} */
|
2023-01-30 19:50:44 +00:00
|
|
|
describe('mode: "directory"', () => {
|
|
|
|
let fixture;
|
|
|
|
|
|
|
|
before(async () => {
|
|
|
|
fixture = await loadFixture({
|
|
|
|
root: './fixtures/basics/',
|
2023-02-03 15:19:44 +00:00
|
|
|
output: 'server',
|
2023-01-30 19:52:54 +00:00
|
|
|
adapter: cloudflare({ mode: 'directory' }),
|
2023-01-30 19:50:44 +00:00
|
|
|
});
|
2023-02-03 15:19:44 +00:00
|
|
|
await fixture.build();
|
2023-01-30 19:50:44 +00:00
|
|
|
});
|
|
|
|
|
2023-02-03 15:19:44 +00:00
|
|
|
it('generates functions folder inside the project root', async () => {
|
|
|
|
expect(await fixture.pathExists('../functions')).to.be.true;
|
2023-01-30 19:50:44 +00:00
|
|
|
});
|
|
|
|
});
|