Skip to content

Commit

Permalink
[Tests] update plugins_discovery test
Browse files Browse the repository at this point in the history
Updating a test that discovers plugins to have the correct amount.
The original tests removed the creation of the mock related to x-pack.

Update the test to get the correct values while running tests.

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
  • Loading branch information
kavilla committed Mar 25, 2021
1 parent e3a9612 commit b93ef34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/server/plugins/discovery/plugins_discovery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ describe('plugins discovery system', () => {
const plugins = await plugin$.pipe(toArray()).toPromise();
const pluginNames = plugins.map((plugin) => plugin.name);

expect(pluginNames).toHaveLength(3);
expect(pluginNames).toEqual(expect.arrayContaining(['pluginA', 'pluginB', 'pluginC']));
expect(pluginNames).toHaveLength(2);
expect(pluginNames).toEqual(expect.arrayContaining(['pluginA', 'pluginB']));
});

it('return errors when the manifest is invalid or incompatible', async () => {
Expand Down

0 comments on commit b93ef34

Please sign in to comment.