[ci] format

This commit is contained in:
tony-sull 2022-05-20 20:08:13 +00:00 committed by github-actions[bot]
parent d372d29ef8
commit d296eb63eb

View file

@ -73,14 +73,14 @@ describe('getStaticPaths - route params type validation', () => {
}); });
}); });
describe ('getStaticPaths - numeric route params', () => { describe('getStaticPaths - numeric route params', () => {
let fixture; let fixture;
let devServer; let devServer;
before(async () => { before(async () => {
fixture = await loadFixture({ fixture = await loadFixture({
root: './fixtures/astro-get-static-paths/', root: './fixtures/astro-get-static-paths/',
site: 'https://mysite.dev/' site: 'https://mysite.dev/',
}); });
devServer = await fixture.startDevServer(); devServer = await fixture.startDevServer();
}); });
@ -94,12 +94,15 @@ describe ('getStaticPaths - numeric route params', () => {
for (const page of [1, 2, 3]) { for (const page of [1, 2, 3]) {
let res = await fixture.fetch(`/posts/${page}`); let res = await fixture.fetch(`/posts/${page}`);
expect(res.status).to.equal(200); expect(res.status).to.equal(200);
const html = await res.text(); const html = await res.text();
const $ = cheerio.load(html); const $ = cheerio.load(html);
const canonical = $('link[rel=canonical]'); const canonical = $('link[rel=canonical]');
expect(canonical.attr('href')).to.equal(`https://mysite.dev/posts/${page}/`, `doesn't trim the /${page}/ route param`); expect(canonical.attr('href')).to.equal(
`https://mysite.dev/posts/${page}/`,
`doesn't trim the /${page}/ route param`
);
} }
}); });
}); });