How to use the npm-run-all.mockImplementation function in npm-run-all

To help you get started, we’ve selected a few npm-run-all examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nrwl / nx / packages / workspace / src / tasks-runner / default-tasks-runner.spec.ts View on Github external
it('should run emit task complete events when "run-all-prerender" resolves', done => {
    runAll.mockImplementation(() => Promise.resolve());
    let i = 0;
    const expected = [
      {
        task: tasks[0],
        type: AffectedEventType.TaskComplete,
        success: true
      },
      {
        task: tasks[1],
        type: AffectedEventType.TaskComplete,
        success: true
      }
    ];
    defaultTaskRunner(tasks, {}, context).subscribe({
      next: event => {
        expect(event).toEqual(expected[i++]);

npm-run-all

A CLI tool to run multiple npm-scripts in parallel or sequential.

MIT
Latest version published 6 years ago

Package Health Score

76 / 100
Full package analysis

Popular npm-run-all functions