refactor: server emit events (#11780)

This commit is contained in:
Jason Rasmussen
2024-08-15 16:12:41 -04:00
committed by GitHub
parent 32c05ea950
commit 433c7ab01d
27 changed files with 222 additions and 182 deletions
+3 -3
View File
@@ -95,7 +95,7 @@ describe(MetadataService.name, () => {
});
afterEach(async () => {
await sut.onShutdownEvent();
await sut.onShutdown();
});
it('should be defined', () => {
@@ -104,7 +104,7 @@ describe(MetadataService.name, () => {
describe('onBootstrapEvent', () => {
it('should pause and resume queue during init', async () => {
await sut.onBootstrapEvent('microservices');
await sut.onBootstrap('microservices');
expect(jobMock.pause).toHaveBeenCalledTimes(1);
expect(mapMock.init).toHaveBeenCalledTimes(1);
@@ -114,7 +114,7 @@ describe(MetadataService.name, () => {
it('should return if reverse geocoding is disabled', async () => {
systemMock.get.mockResolvedValue({ reverseGeocoding: { enabled: false } });
await sut.onBootstrapEvent('microservices');
await sut.onBootstrap('microservices');
expect(jobMock.pause).not.toHaveBeenCalled();
expect(mapMock.init).not.toHaveBeenCalled();