mirror of
https://github.com/withastro/astro.git
synced 2025-03-31 23:31:30 -05:00
[ci] format
This commit is contained in:
parent
a1c31665cb
commit
8b8bf603b1
2 changed files with 9 additions and 9 deletions
|
@ -93,8 +93,8 @@ export const setup = async (app) => {
|
|||
s.prepend(`import ${JSON.stringify(appEntrypoint)};\n`);
|
||||
return {
|
||||
code: s.toString(),
|
||||
map: s.generateMap({ hires: 'boundary' })
|
||||
}
|
||||
map: s.generateMap({ hires: 'boundary' }),
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -10,12 +10,12 @@ describe('App Entrypoint CSS', () => {
|
|||
fixture = await loadFixture({
|
||||
root: './fixtures/app-entrypoint-css/',
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
describe('build', () => {
|
||||
before(async () => {
|
||||
await fixture.build();
|
||||
})
|
||||
});
|
||||
|
||||
it('injects styles referenced in appEntrypoint', async () => {
|
||||
const html = await fixture.readFile('/index.html');
|
||||
|
@ -35,21 +35,21 @@ describe('App Entrypoint CSS', () => {
|
|||
expect($('style').length).to.eq(0);
|
||||
expect($('link[rel="stylesheet"]').length).to.eq(0);
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
describe('dev', () => {
|
||||
let devServer;
|
||||
before(async () => {
|
||||
devServer = await fixture.startDevServer();
|
||||
})
|
||||
});
|
||||
after(async () => {
|
||||
await devServer.stop();
|
||||
})
|
||||
});
|
||||
|
||||
it('loads during SSR', async () => {
|
||||
const html = await fixture.fetch('/').then((res) => res.text());
|
||||
const $ = cheerioLoad(html);
|
||||
|
||||
|
||||
// test 1: basic component renders
|
||||
expect($('#foo > #bar').text()).to.eq('works');
|
||||
// test 2: injects the global style on the page
|
||||
|
@ -63,5 +63,5 @@ describe('App Entrypoint CSS', () => {
|
|||
expect($('style').length).to.eq(0);
|
||||
expect($('link[rel="stylesheet"]').length).to.eq(0);
|
||||
});
|
||||
})
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue