Remove unneeded test
Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
@@ -84,60 +84,4 @@ describe('createBackend', () => {
|
||||
}),
|
||||
).toThrow('The core.pluginMetadata service cannot be overridden');
|
||||
});
|
||||
|
||||
it('should prioritize services correctly', async () => {
|
||||
const backend = createBackend({
|
||||
services: [
|
||||
createServiceFactory({
|
||||
service: coreServices.rootHttpRouter,
|
||||
deps: {},
|
||||
async factory() {
|
||||
return {
|
||||
use() {},
|
||||
};
|
||||
},
|
||||
}),
|
||||
mockServices.config.factory({
|
||||
data: { root: 'root-backend' },
|
||||
}),
|
||||
createServiceFactory({
|
||||
service: fooServiceRef,
|
||||
deps: {},
|
||||
async factory() {
|
||||
return 'foo-backend';
|
||||
},
|
||||
}),
|
||||
createServiceFactory({
|
||||
service: barServiceRef,
|
||||
deps: {},
|
||||
async factory() {
|
||||
return 'bar-backend';
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
expect.assertions(3);
|
||||
backend.add(
|
||||
createBackendPlugin({
|
||||
pluginId: 'test',
|
||||
register(reg) {
|
||||
reg.registerInit({
|
||||
deps: {
|
||||
config: coreServices.config,
|
||||
foo: fooServiceRef,
|
||||
bar: barServiceRef,
|
||||
},
|
||||
async init({ config, foo, bar }) {
|
||||
expect(config.get('root')).toBe('root-backend');
|
||||
expect(foo).toBe('foo-backend');
|
||||
expect(bar).toBe('bar-backend');
|
||||
},
|
||||
});
|
||||
},
|
||||
})(),
|
||||
);
|
||||
|
||||
await backend.start();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user