<commit_before>import {execSync} from "child_process";
import assert from "power-assert";
import {result, removeResult} from "./lib/util";

// Test targets.
import runAll from "../lib/index";
import "../lib/command";

describe("npm-run-all", () => {
  beforeEach(removeResult);
  after(removeResult);

  describe("should run tasks on parallel when was given --parallel option:", () => {
    it("lib version", () => {
      return runAll(["test-task:append-a", "test-task:append-b"], {parallel: true})
        .then(() => {
          assert(result() === "abab" || result() === "baba");
        });
    });

    it("command version", () => {
      execSync("node lib/command.js --parallel test-task:append-a test-task:append-b");
      assert(result() === "abab" || result() === "baba");
    });
  });

});<commit_msg>Fix test for parallel<commit_after>import {execSync} from "child_process";
import assert from "power-assert";
import {result, removeResult} from "./lib/util";

// Test targets.
import runAll from "../lib/index";
import "../lib/command";

describe("npm-run-all", () => {
  beforeEach(removeResult);
  after(removeResult);

  describe("should run tasks on parallel when was given --parallel option:", () => {
    it("lib version", () => {
      return runAll(["test-task:append-a", "test-task:append-b"], {parallel: true})
        .then(() => {
          assert(result() === "abab" ||
                 result() === "baba" ||
                 result() === "abba" ||
                 result() === "baab");
        });
    });

    it("command version", () => {
      execSync("node lib/command.js --parallel test-task:append-a test-task:append-b");
      assert(result() === "abab" ||
             result() === "baba" ||
             result() === "abba" ||
             result() === "baab");
    });
  });

});
{'fraction_non_alphanumeric': 0.21624588364434688, 'fraction_numerical': 0.0, 'mean_word_length': 2.7665289256198347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3661381', 'n_tokens_mistral': 554, 'n_tokens_neox': 545, 'n_words': 125}