summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar tony-sull <tony-sull@users.noreply.github.com> 2022-05-20 20:08:13 +0000
committerGravatar github-actions[bot] <github-actions[bot]@users.noreply.github.com> 2022-05-20 20:08:13 +0000
commitd296eb63ebc08d49184cf98d57cbe6c85d41b474 (patch)
tree5df8c02609f8376418764a500e24a178157488da
parentd372d29ef8f540fca077f5e1318a2bbb5e7ec360 (diff)
downloadastro-d296eb63ebc08d49184cf98d57cbe6c85d41b474.tar.gz
astro-d296eb63ebc08d49184cf98d57cbe6c85d41b474.tar.zst
astro-d296eb63ebc08d49184cf98d57cbe6c85d41b474.zip
[ci] format
-rw-r--r--packages/astro/test/astro-get-static-paths.test.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/packages/astro/test/astro-get-static-paths.test.js b/packages/astro/test/astro-get-static-paths.test.js
index e5112139d..2c4559d81 100644
--- a/packages/astro/test/astro-get-static-paths.test.js
+++ b/packages/astro/test/astro-get-static-paths.test.js
@@ -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();
});
@@ -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`
+ );
}
});
});