Skip to content

Commit 8e51bf9

Browse files
ematipicoastrobot-houston
authored andcommitted
[ci] format
1 parent ec7d2eb commit 8e51bf9

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

packages/integrations/sitemap/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ const createPlugin = (options?: SitemapOptions): AstroIntegration => {
9898
.map((p) => {
9999
if (p.pathname !== '' && !finalSiteUrl.pathname.endsWith('/'))
100100
finalSiteUrl.pathname += '/';
101-
if (p.pathname.startsWith('/'))
102-
p.pathname = p.pathname.slice(1);
101+
if (p.pathname.startsWith('/')) p.pathname = p.pathname.slice(1);
103102
const fullPath = finalSiteUrl.pathname + p.pathname;
104103
return new URL(fullPath, finalSiteUrl).href;
105104
});
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
import {before, describe, it} from "node:test";
2-
import {loadFixture, readXML} from "./test-utils.js";
3-
import assert from "node:assert/strict";
1+
import { before, describe, it } from 'node:test';
2+
import { loadFixture, readXML } from './test-utils.js';
3+
import assert from 'node:assert/strict';
44

55
describe('Dynamic with rest parameter', () => {
66
/** @type {import('./test-utils.js').Fixture} */
77
let fixture;
8-
8+
99
before(async () => {
1010
fixture = await loadFixture({
1111
root: './fixtures/dynamic',
1212
});
1313
await fixture.build();
1414
});
15-
15+
1616
it('Should generate correct urls', async () => {
1717
const data = await readXML(fixture.readFile('/sitemap-0.xml'));
1818
const urls = data.urlset.url.map((url) => url.loc[0]);
19-
19+
2020
assert.ok(urls.includes('http://example.com/'));
2121
assert.ok(urls.includes('http://example.com/blog/'));
2222
assert.ok(urls.includes('http://example.com/test/'));
2323
});
24-
})
24+
});

0 commit comments

Comments
 (0)