Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Dec 10, 2022
1 parent b2f0210 commit 64b24f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/astro/src/core/build/vite-plugin-ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ function buildManifest(
);
}
if (settings.scripts.some((script) => script.stage === 'page')) {
const src = entryModules[PAGE_SCRIPT_ID];
const src = entryModules[PAGE_SCRIPT_ID];

scripts.push({
type: 'external',
value: joinBase(src)
value: joinBase(src),
});
}

Expand Down
12 changes: 6 additions & 6 deletions packages/astro/test/ssr-request.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ describe('Using Astro.request in SSR', () => {
name: 'inject-script',
hooks: {
'astro:config:setup'({ injectScript }) {
injectScript('page', 'import "/src/scripts/inject-script.js";')
}
}
}
injectScript('page', 'import "/src/scripts/inject-script.js";');
},
},
},
],
vite: {
build: {
Expand Down Expand Up @@ -74,13 +74,13 @@ describe('Using Astro.request in SSR', () => {
const html = await response.text();
const $ = cheerioLoad(html);

for(const el of $('script')) {
for (const el of $('script')) {
const scriptSrc = $(el).attr('src');
expect(scriptSrc.startsWith('/subpath/')).to.equal(true);

request = new Request('http://example.com' + scriptSrc);
response = await app.render(request);

expect(response.status).to.equal(200);
const js = await response.text();
expect(js).to.not.be.an('undefined');
Expand Down

0 comments on commit 64b24f0

Please sign in to comment.