|
|
@@ -52,28 +52,28 @@ describe('PluginInventoryService', () => {
|
|
|
})
|
|
|
await ctx.loader.create({ name: 'cordis:active', group: true })
|
|
|
|
|
|
- expect(inventory.list()).toEqual({
|
|
|
- entries: [
|
|
|
- {
|
|
|
- entryId: activeId,
|
|
|
- moduleName: 'cordis:active',
|
|
|
- enabled: true,
|
|
|
- fiberPhase: 'active',
|
|
|
- },
|
|
|
- {
|
|
|
- entryId: pendingId,
|
|
|
- moduleName: 'cordis:pending',
|
|
|
- enabled: true,
|
|
|
- fiberPhase: 'pending',
|
|
|
- },
|
|
|
- {
|
|
|
- entryId: disabledId,
|
|
|
- moduleName: 'cordis:not-installed',
|
|
|
- enabled: false,
|
|
|
- fiberPhase: null,
|
|
|
- },
|
|
|
- ],
|
|
|
- })
|
|
|
+ const snapshot = inventory.list()
|
|
|
+ expect(snapshot.entries).toHaveLength(3)
|
|
|
+ expect(snapshot.entries).toEqual(expect.arrayContaining([
|
|
|
+ {
|
|
|
+ entryId: activeId,
|
|
|
+ moduleName: 'cordis:active',
|
|
|
+ enabled: true,
|
|
|
+ fiberPhase: 'active',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ entryId: pendingId,
|
|
|
+ moduleName: 'cordis:pending',
|
|
|
+ enabled: true,
|
|
|
+ fiberPhase: 'pending',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ entryId: disabledId,
|
|
|
+ moduleName: 'cordis:not-installed',
|
|
|
+ enabled: false,
|
|
|
+ fiberPhase: null,
|
|
|
+ },
|
|
|
+ ]))
|
|
|
|
|
|
await ctx.loader.update(activeId, { disabled: true })
|
|
|
expect(inventory.list().entries.find(entry => entry.entryId === activeId)).toEqual({
|