test(docs-infra): use existing `MockLogger` class in `SwUpdatesService` tests (#39651)
Since we have a `MockLogger` class in `src/testing/`, there is no need to create a new `MockLogger` class for the `SwUpdatesService` unit tests. This commit switches to using the `MockLogger` class from `src/testing/`. PR Close #39651
This commit is contained in:
parent
0e859381bc
commit
824f051843
|
@ -4,6 +4,7 @@ import { SwUpdate } from '@angular/service-worker';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
import { Logger } from 'app/shared/logger.service';
|
import { Logger } from 'app/shared/logger.service';
|
||||||
|
import { MockLogger } from 'testing/logger.service';
|
||||||
import { SwUpdatesService } from './sw-updates.service';
|
import { SwUpdatesService } from './sw-updates.service';
|
||||||
|
|
||||||
|
|
||||||
|
@ -204,10 +205,6 @@ class MockApplicationRef {
|
||||||
isStable = new Subject<boolean>();
|
isStable = new Subject<boolean>();
|
||||||
}
|
}
|
||||||
|
|
||||||
class MockLogger {
|
|
||||||
log = jasmine.createSpy('MockLogger.log');
|
|
||||||
}
|
|
||||||
|
|
||||||
class MockSwUpdate {
|
class MockSwUpdate {
|
||||||
$$availableSubj = new Subject<{available: {hash: string}}>();
|
$$availableSubj = new Subject<{available: {hash: string}}>();
|
||||||
$$activatedSubj = new Subject<{current: {hash: string}}>();
|
$$activatedSubj = new Subject<{current: {hash: string}}>();
|
||||||
|
|
Loading…
Reference in New Issue