Paul Gschwendtner 397ea00552 build: migrate @angular-devkit/architect/node tests to rules_js
Migrates the sub-entry point tests for architect/node to `rules_js`.
2025-01-21 18:19:11 +01:00

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);
});
});