mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
[ci] format
This commit is contained in:
parent
12ec35feff
commit
9b530bdece
1 changed files with 7 additions and 9 deletions
|
@ -19,12 +19,7 @@ export function prepareTestFactory({ root }) {
|
||||||
await devServer.stop();
|
await devServer.stop();
|
||||||
});
|
});
|
||||||
|
|
||||||
const createTests = ({
|
const createTests = ({ pageUrl, pageSourceFilePath, componentFilePath, counterCssFilePath }) => {
|
||||||
pageUrl,
|
|
||||||
pageSourceFilePath,
|
|
||||||
componentFilePath,
|
|
||||||
counterCssFilePath,
|
|
||||||
}) => {
|
|
||||||
test('server only', async ({ page, astro }) => {
|
test('server only', async ({ page, astro }) => {
|
||||||
await page.goto(astro.resolveUrl(pageUrl));
|
await page.goto(astro.resolveUrl(pageUrl));
|
||||||
|
|
||||||
|
@ -132,7 +127,10 @@ export function prepareTestFactory({ root }) {
|
||||||
|
|
||||||
// Edit the client:only component's slot text
|
// Edit the client:only component's slot text
|
||||||
await astro.editFile(componentFilePath, (original) =>
|
await astro.editFile(componentFilePath, (original) =>
|
||||||
original.replace('Framework client:only component', 'Updated framework client:only component')
|
original.replace(
|
||||||
|
'Framework client:only component',
|
||||||
|
'Updated framework client:only component'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
const label = page.locator('#client-only');
|
const label = page.locator('#client-only');
|
||||||
|
@ -147,11 +145,11 @@ export function prepareTestFactory({ root }) {
|
||||||
);
|
);
|
||||||
|
|
||||||
await expect(count, 'imported CSS updated').toHaveCSS('font-size', '24px');
|
await expect(count, 'imported CSS updated').toHaveCSS('font-size', '24px');
|
||||||
|
|
||||||
// Revert our edits
|
// Revert our edits
|
||||||
astro.resetAllFiles();
|
astro.resetAllFiles();
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
test,
|
test,
|
||||||
|
|
Loading…
Reference in a new issue