Skip to content

Commit ccf0c14

Browse files
florian-lefebvreastrobot-houston
authored andcommitted
[ci] format
1 parent bedc31b commit ccf0c14

File tree

4 files changed

+74
-74
lines changed

4 files changed

+74
-74
lines changed

packages/integrations/sitemap/src/config-defaults.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const SITEMAP_CONFIG_DEFAULTS = {
55
entryLimit: 45000,
66
namespaces: {
77
news: true,
8-
xhtml: true,
8+
xhtml: true,
99
image: true,
1010
video: true,
1111
},

packages/integrations/sitemap/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export type SitemapOptions =
3939
serialize?(item: SitemapItem): SitemapItem | Promise<SitemapItem | undefined> | undefined;
4040

4141
xslURL?: string;
42-
43-
// namespace configuration
42+
43+
// namespace configuration
4444
namespaces?: {
4545
news?: boolean;
4646
xhtml?: boolean;

packages/integrations/sitemap/src/schema.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ export const SitemapOptionsSchema = z
4040

4141
namespaces: z
4242
.object({
43-
news: z.boolean().optional(),
44-
xhtml: z.boolean().optional(),
45-
image: z.boolean().optional(),
46-
video: z.boolean().optional(),
43+
news: z.boolean().optional(),
44+
xhtml: z.boolean().optional(),
45+
image: z.boolean().optional(),
46+
video: z.boolean().optional(),
4747
})
4848
.optional()
4949
.default(SITEMAP_CONFIG_DEFAULTS.namespaces),

packages/integrations/sitemap/test/namespaces.test.js

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -4,76 +4,76 @@ import { sitemap } from './fixtures/static/deps.mjs';
44
import { loadFixture } from './test-utils.js';
55

66
describe('Namespaces Configuration', () => {
7-
let fixture;
7+
let fixture;
88

9-
describe('Default namespaces', () => {
10-
before(async () => {
11-
fixture = await loadFixture({
12-
root: './fixtures/static/',
13-
integrations: [sitemap()],
14-
});
15-
await fixture.build();
16-
});
9+
describe('Default namespaces', () => {
10+
before(async () => {
11+
fixture = await loadFixture({
12+
root: './fixtures/static/',
13+
integrations: [sitemap()],
14+
});
15+
await fixture.build();
16+
});
1717

18-
it('includes all default namespaces', async () => {
19-
const xml = await fixture.readFile('/sitemap-0.xml');
20-
assert.ok(xml.includes('xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"'));
21-
assert.ok(xml.includes('xmlns:xhtml="http://www.w3.org/1999/xhtml"'));
22-
assert.ok(xml.includes('xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"'));
23-
assert.ok(xml.includes('xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"'));
24-
});
25-
});
18+
it('includes all default namespaces', async () => {
19+
const xml = await fixture.readFile('/sitemap-0.xml');
20+
assert.ok(xml.includes('xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"'));
21+
assert.ok(xml.includes('xmlns:xhtml="http://www.w3.org/1999/xhtml"'));
22+
assert.ok(xml.includes('xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"'));
23+
assert.ok(xml.includes('xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"'));
24+
});
25+
});
2626

27-
describe('Excluding news namespace', () => {
28-
before(async () => {
29-
fixture = await loadFixture({
30-
root: './fixtures/static/',
31-
integrations: [
32-
sitemap({
33-
namespaces: {
34-
news: false,
35-
},
36-
}),
37-
],
38-
});
39-
await fixture.build();
40-
});
27+
describe('Excluding news namespace', () => {
28+
before(async () => {
29+
fixture = await loadFixture({
30+
root: './fixtures/static/',
31+
integrations: [
32+
sitemap({
33+
namespaces: {
34+
news: false,
35+
},
36+
}),
37+
],
38+
});
39+
await fixture.build();
40+
});
4141

42-
it('excludes news namespace but includes others', async () => {
43-
const xml = await fixture.readFile('/sitemap-0.xml');
44-
assert.ok(!xml.includes('xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"'));
45-
assert.ok(xml.includes('xmlns:xhtml="http://www.w3.org/1999/xhtml"'));
46-
assert.ok(xml.includes('xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"'));
47-
assert.ok(xml.includes('xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"'));
48-
});
49-
});
42+
it('excludes news namespace but includes others', async () => {
43+
const xml = await fixture.readFile('/sitemap-0.xml');
44+
assert.ok(!xml.includes('xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"'));
45+
assert.ok(xml.includes('xmlns:xhtml="http://www.w3.org/1999/xhtml"'));
46+
assert.ok(xml.includes('xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"'));
47+
assert.ok(xml.includes('xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"'));
48+
});
49+
});
5050

51-
describe('Minimal namespaces', () => {
52-
before(async () => {
53-
fixture = await loadFixture({
54-
root: './fixtures/static/',
55-
integrations: [
56-
sitemap({
57-
namespaces: {
58-
news: false,
59-
xhtml: false,
60-
image: false,
61-
video: false,
62-
},
63-
}),
64-
],
65-
});
66-
await fixture.build();
67-
});
51+
describe('Minimal namespaces', () => {
52+
before(async () => {
53+
fixture = await loadFixture({
54+
root: './fixtures/static/',
55+
integrations: [
56+
sitemap({
57+
namespaces: {
58+
news: false,
59+
xhtml: false,
60+
image: false,
61+
video: false,
62+
},
63+
}),
64+
],
65+
});
66+
await fixture.build();
67+
});
6868

69-
it('excludes all optional namespaces', async () => {
70-
const xml = await fixture.readFile('/sitemap-0.xml');
71-
assert.ok(!xml.includes('xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"'));
72-
assert.ok(!xml.includes('xmlns:xhtml="http://www.w3.org/1999/xhtml"'));
73-
assert.ok(!xml.includes('xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"'));
74-
assert.ok(!xml.includes('xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"'));
75-
// Still includes the main sitemap namespace
76-
assert.ok(xml.includes('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"'));
77-
});
78-
});
79-
});
69+
it('excludes all optional namespaces', async () => {
70+
const xml = await fixture.readFile('/sitemap-0.xml');
71+
assert.ok(!xml.includes('xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"'));
72+
assert.ok(!xml.includes('xmlns:xhtml="http://www.w3.org/1999/xhtml"'));
73+
assert.ok(!xml.includes('xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"'));
74+
assert.ok(!xml.includes('xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"'));
75+
// Still includes the main sitemap namespace
76+
assert.ok(xml.includes('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"'));
77+
});
78+
});
79+
});

0 commit comments

Comments
 (0)