/** * Copyright (c) 2017-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import '@babel/polyfill'; import createSitemap from '@lib/core/sitemap'; import loadSetup from '../loadSetup'; describe('sitemap', () => { test('simple site', async () => { const props = await loadSetup('simple'); const sitemap = await createSitemap(props); expect(sitemap).toContain( ``, ); }); test('translated site', async () => { const props = await loadSetup('translated'); const sitemap = await createSitemap(props); expect(sitemap).toContain( ``, ); }); test('versioned site', async () => { const props = await loadSetup('versioned'); const sitemap = await createSitemap(props); expect(sitemap).toContain( ``, ); }); test('translated + versioned site', async () => { const props = await loadSetup('transversioned'); const sitemap = await createSitemap(props); expect(sitemap).toContain( ``, ); }); test('empty site', async () => { const props = await loadSetup('empty'); expect(createSitemap(props)).rejects.toThrowErrorMatchingInlineSnapshot( `"Url in docusaurus.config.js cannot be empty/undefined"`, ); }); });