Skip to content

Commit

Permalink
test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
zburke committed Jun 10, 2024
1 parent 78501ed commit 0a7e6bb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/discoverServices.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('discoveryReducer', () => {
it('handles DISCOVERY_APPLICATIONS', () => {
let state = {};
const moduleDescriptors = [
{ id: 'mod-a' },
{ id: 'mod-a', provides: [{ id: 'if-a', version: '1.0' }] },
{ id: 'mod-b' },
];
const uiModules = [
Expand All @@ -122,7 +122,13 @@ describe('discoveryReducer', () => {
[action.data.id]: {
name: action.data.id,
modules: [
...moduleDescriptors.map((d) => ({ name: d.id, interfaces: [] })),
...moduleDescriptors.map((d) => (
{
name: d.id,
interfaces: d.provides?.map((i) => {
return { name: i.id + ' ' + i.version };
}) || []
})),
...uiModules.map((d) => ({ name: d.id, interfaces: [] })),
],
},
Expand Down

0 comments on commit 0a7e6bb

Please sign in to comment.