Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should load all core plugins', async () => {
// eslint-disable-next-line global-require
require('conf').__setStoreData('plugins', [
path.join(CORE_PLUGIN_PATH, 'foo-plugin'),
path.join(CORE_PLUGIN_PATH, 'bar-plugin'),
path.join(CORE_PLUGIN_PATH, 'baz-plugin'),
]);
// eslint-disable-next-line global-require
require('plist').__setParseObject({
objects: [],
});
// load core plugins
const results = await plugins.loadPlugins([
{ path: CORE_PLUGIN_PATH, isCore: true },
]);
expect(results.length).toBeGreaterThan(0);
expect(results.filter(p => p.name === 'about')).toBeTruthy();
});
});