mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 01:54:04 +08:00
25 lines
729 B
TypeScript
25 lines
729 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
*/
|
|
|
|
import * as path from 'path';
|
|
import { lastValueFrom } from 'rxjs';
|
|
import { NodeModuleJobRegistry } from './job-registry';
|
|
import { jobs } from '../../src';
|
|
|
|
const root = path.join(__dirname, '../test/jobs');
|
|
|
|
describe('NodeModuleJobScheduler', () => {
|
|
it('works', async () => {
|
|
const registry = new NodeModuleJobRegistry();
|
|
const scheduler = new jobs.SimpleScheduler(registry);
|
|
|
|
const job = scheduler.schedule(path.join(root, 'add'), [1, 2, 3]);
|
|
expect(await lastValueFrom(job.output)).toBe(6);
|
|
});
|
|
});
|