@@ -4,76 +4,76 @@ import { sitemap } from './fixtures/static/deps.mjs';
4
4
import { loadFixture } from './test-utils.js' ;
5
5
6
6
describe ( 'Namespaces Configuration' , ( ) => {
7
- let fixture ;
7
+ let fixture ;
8
8
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
+ } ) ;
17
17
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
+ } ) ;
26
26
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
+ } ) ;
41
41
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
+ } ) ;
50
50
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
+ } ) ;
68
68
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