Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-sull authored and github-actions[bot] committed May 20, 2022
1 parent d372d29 commit d296eb6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/astro/test/astro-get-static-paths.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ describe('getStaticPaths - route params type validation', () => {
});
});

describe ('getStaticPaths - numeric route params', () => {
describe('getStaticPaths - numeric route params', () => {
let fixture;
let devServer;

before(async () => {
fixture = await loadFixture({
root: './fixtures/astro-get-static-paths/',
site: 'https://mysite.dev/'
site: 'https://mysite.dev/',
});
devServer = await fixture.startDevServer();
});
Expand All @@ -94,12 +94,15 @@ describe ('getStaticPaths - numeric route params', () => {
for (const page of [1, 2, 3]) {
let res = await fixture.fetch(`/posts/${page}`);
expect(res.status).to.equal(200);

const html = await res.text();
const $ = cheerio.load(html);

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`
);
}
});
});

0 comments on commit d296eb6

Please sign in to comment.