Skip to content

Commit

Permalink
Remove getActivePluginsModule test
Browse files Browse the repository at this point in the history
  • Loading branch information
redallen committed Aug 16, 2019
1 parent e6ea06b commit 6b59eef
Showing 1 changed file with 1 addition and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Plugin, HrefNavItem } from '../../typings';
import { loadActivePlugins, getActivePluginsModule } from '../active-plugins';
import { PluginPackage } from '../plugin-resolver';
import { loadActivePlugins } from '../active-plugins';
import { templatePackage } from './plugin-resolver.spec';

describe('active-plugins', () => {
Expand Down Expand Up @@ -61,35 +60,4 @@ describe('active-plugins', () => {
]);
});
});

describe('getActivePluginsModule', () => {
it('returns module source that exports the list of active plugins', () => {
const pluginPackages: PluginPackage[] = [
{
...templatePackage,
name: 'foo',
consolePlugin: { entry: 'src/plugin.ts' },
},
{
...templatePackage,
name: 'bar-plugin',
consolePlugin: { entry: 'index.ts' },
},
];

expect(getActivePluginsModule(pluginPackages)).toBe(
`
const activePlugins = [];
const plugin_0 = require('foo/src/plugin.ts').default;
activePlugins.push({ name: 'foo', extensions: plugin_0 });
const plugin_1 = require('bar-plugin/index.ts').default;
activePlugins.push({ name: 'bar-plugin', extensions: plugin_1 });
export default activePlugins;
`.replace(/^\s+/gm, ''),
);
});
});
});

0 comments on commit 6b59eef

Please sign in to comment.