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