Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import path from 'path';
import fs from 'fs-extra';
import {
DEFAULT_PARSE_FRONT_MATTER,
DEFAULT_VCS_CONFIG,
TEST_VCS as DEFAULT_VCS_CONFIG,
} from '@docusaurus/utils';
import {fromPartial} from '@total-typescript/shoehorn';
import {
Expand Down Expand Up @@ -38,6 +38,9 @@ const DefaultI18N: I18n = {
htmlLang: 'en',
calendar: 'gregory',
path: 'en',
translate: true,
url: 'https://docusaurus.io',
baseUrl: '/',
},
},
};
Expand Down Expand Up @@ -345,9 +348,16 @@ describe.each(['atom', 'rss', 'json'] as const)('%s', (feedType) => {
},
);

expect(
fsMock.mock.calls.map((call) => call[1] as string),
).toMatchSnapshot();
const outputs = fsMock.mock.calls.map((call) => call[1] as string);
expect(outputs).toMatchSnapshot();

// Regression test for https://github.com/facebook/docusaurus/issues/7656
// Feed URLs should have trailing slashes when trailingSlash: true
outputs.forEach((output) => {
expect(output).toContain(
'https://docusaurus.io/myBaseUrl/blog/blog-with-links/',
);
});
});

it('has xslt files for feed', async () => {
Expand Down
Loading