mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 18:32:52 +02:00
refactor(v2): simplify code by removing wip i18n & translation (#1431)
* refactor(v2): remove i18n & versioning + cleaner code * totally remove i18n and versioning from plugin
This commit is contained in:
parent
0813920349
commit
373d17ee72
123 changed files with 170 additions and 4162 deletions
|
@ -5,22 +5,19 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import loadSetup from '../../../docusaurus/test/loadSetup';
|
||||
import loadSetup from '../../../docusaurus/lib/server/load/__tests__/loadSetup';
|
||||
import DocusaurusPluginSitemap from '../index';
|
||||
|
||||
describe('docusaurus-plugin-sitemap', () => {
|
||||
describe('createSitemap', () => {
|
||||
test.each(['simple', 'versioned', 'translated', 'transversioned'])(
|
||||
'%s website',
|
||||
async type => {
|
||||
const context = await loadSetup(type);
|
||||
const plugin = new DocusaurusPluginSitemap(context, null);
|
||||
const sitemap = await plugin.createSitemap(context);
|
||||
expect(sitemap).toContain(
|
||||
`<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">`,
|
||||
);
|
||||
},
|
||||
);
|
||||
test.each(['simple'])('%s website', async type => {
|
||||
const context = await loadSetup(type);
|
||||
const plugin = new DocusaurusPluginSitemap(context, null);
|
||||
const sitemap = await plugin.createSitemap(context);
|
||||
expect(sitemap).toContain(
|
||||
`<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">`,
|
||||
);
|
||||
});
|
||||
|
||||
test('empty site', async () => {
|
||||
const context = await loadSetup('empty');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue