Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an option to disable HTTP streaming #3777

Merged
merged 18 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
re-enabling the test with an adapter option to disable streaming for …
…the test
  • Loading branch information
Tony Sullivan committed Jun 30, 2022
commit bae78c47666d81b60311ee8452459f92704c5ce0
4 changes: 2 additions & 2 deletions packages/astro/test/streaming.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ describe('Streaming disabled', () => {
// TODO: find a different solution for the test-adapter,
// currently there's no way to resolve two different versions with one
// having streaming disabled
describe.skip('Production', () => {
describe('Production', () => {
before(async () => {
await fixture.build();
});

it('Can get the full html body', async () => {
const app = await fixture.loadTestAdapterApp();
const app = await fixture.loadTestAdapterApp(false);
const request = new Request('http:https://example.com/');
const response = await app.render(request);

Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/test-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function () {
},
load(id) {
if (id === '@my-ssr') {
return `import { App } from 'astro/app';export function createExports(manifest) { return { manifest, createApp: () => new App(manifest) }; }`;
return `import { App } from 'astro/app';export function createExports(manifest) { return { manifest, createApp: (streaming) => new App(manifest, streaming) }; }`;
}
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/test/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ export async function loadFixture(inlineConfig) {
clean: async () => {
await fs.promises.rm(config.outDir, { maxRetries: 10, recursive: true, force: true });
},
loadTestAdapterApp: async () => {
loadTestAdapterApp: async (streaming) => {
const url = new URL('./server/entry.mjs', config.outDir);
const { createApp, manifest } = await import(url);
const app = createApp();
const app = createApp(streaming);
app.manifest = manifest;
return app;
},
Expand Down