Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Sep 30, 2020
1 parent 2b837a6 commit 8ae07c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/docusaurus/src/server/themes/__tests__/alias.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('themeAlias', () => {
test('valid themePath 1 with components', () => {
const fixtures = path.join(__dirname, '__fixtures__');
const themePath = path.join(fixtures, 'theme-1');
const alias = themeAlias(themePath);
const alias = themeAlias(themePath, true);
expect(alias).toEqual({
'@theme/Footer': path.join(themePath, 'Footer/index.js'),
'@theme-original/Footer': path.join(themePath, 'Footer/index.js'),
Expand All @@ -37,7 +37,7 @@ describe('themeAlias', () => {
test('valid themePath 2 with components', () => {
const fixtures = path.join(__dirname, '__fixtures__');
const themePath = path.join(fixtures, 'theme-2');
const alias = themeAlias(themePath);
const alias = themeAlias(themePath, true);
expect(alias).toEqual({
'@theme/Navbar': path.join(themePath, 'Navbar.js'),
'@theme-original/Navbar': path.join(themePath, 'Navbar.js'),
Expand All @@ -62,7 +62,7 @@ describe('themeAlias', () => {
const fixtures = path.join(__dirname, '__fixtures__');
const themePath = path.join(fixtures, 'empty-theme');
fs.ensureDirSync(themePath);
const alias = themeAlias(themePath);
const alias = themeAlias(themePath, true);
expect(alias).toEqual({});
});

Expand All @@ -77,7 +77,7 @@ describe('themeAlias', () => {
test('invalid themePath that does not exist', () => {
const fixtures = path.join(__dirname, '__fixtures__');
const themePath = path.join(fixtures, '__noExist__');
const alias = themeAlias(themePath);
const alias = themeAlias(themePath, true);
expect(alias).toEqual({});
});
});

0 comments on commit 8ae07c5

Please sign in to comment.