mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00

The previous package was outdated, preventing us from updating TS. This one also lints YAML and JSON, and applies many more rules to the test files, explaining all the changes in this PR.
16 lines
530 B
TypeScript
16 lines
530 B
TypeScript
import { ClusterManager, WorkerManager } from '../../../../src';
|
|
|
|
describe('A WorkerManager', (): void => {
|
|
it('can be created from a ClusterManager.', (): void => {
|
|
expect((): WorkerManager => new WorkerManager(new ClusterManager(4))).toBeDefined();
|
|
});
|
|
|
|
it('can call handle.', async(): Promise<void> => {
|
|
const cm = new ClusterManager(4);
|
|
const wm = new WorkerManager(cm);
|
|
Object.assign(cm, { spawnWorkers: jest.fn() });
|
|
await wm.handle();
|
|
expect(cm.spawnWorkers).toHaveBeenCalledWith();
|
|
});
|
|
});
|