diff --git a/__tests__/api/index.js b/__tests__/api/index.js index 2228595..485725f 100644 --- a/__tests__/api/index.js +++ b/__tests__/api/index.js @@ -70,7 +70,7 @@ describe('plugins', () => { // eslint-disable-next-line global-require, no-underscore-dangle require('child_process').__setCode(null); await api.install('SHOULD_EXIST', '/jest/test'); - expect(await api.getPlugins()).toEqual(['SHOULD_EXIST']); + expect(await api.plugins.getAll()).toEqual(['SHOULD_EXIST']); }); it('should install a plugin that is already installed', async () => { @@ -105,7 +105,7 @@ describe('plugins', () => { // eslint-disable-next-line global-require, no-underscore-dangle require('rimraf').__setError(false); await api.uninstall('SHOULD_EXIST', '/jest/test'); - expect(await api.getPlugins()).toEqual([]); + expect(await api.plugins.getAll()).toEqual([]); }); it('should uninstall a plugin that doesn\'t exist', async () => { diff --git a/src/api/index.js b/src/api/index.js index 0a3e53e..5d08c0f 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -167,13 +167,6 @@ const getConfig = () => new Promise((resolve) => { resolve(config.store); }); -/** - * Get all plugins - * - * @return {String[]} - An array of plugin names - */ -const getPlugins = () => plugins.getAll(); - module.exports = { checkOnNpm, install, @@ -183,5 +176,5 @@ module.exports = { setTheme, getTheme, getConfig, - getPlugins, + plugins, };