Skip to content

Commit

Permalink
Add execParallel() to module test case
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Sep 9, 2023
1 parent 9f8ed8b commit d1a30ab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -112,7 +112,7 @@ $ npx run-scripts compile --only=3
```

## C) Application Code
Even though **run-scripts-util** is primarily intended for build scripts, the package can easily be used programmatically in ESM and TypeScript projects.
Even though **run-scripts-util** is primarily intended for build scripts, the package can be used programmatically in ESM and TypeScript projects.

Example:
``` typescript
Expand Down
12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -111,18 +111,18 @@
},
"devDependencies": {
"@types/fancy-log": "~2.0",
"@types/node": "~20.5",
"@typescript-eslint/eslint-plugin": "~6.4",
"@typescript-eslint/parser": "~6.4",
"add-dist-header": "~1.2",
"@types/node": "~20.6",
"@typescript-eslint/eslint-plugin": "~6.6",
"@typescript-eslint/parser": "~6.6",
"add-dist-header": "~1.3",
"assert-deep-strict-equal": "~1.1",
"copy-file-util": "~1.1",
"copy-folder-util": "~1.1",
"eslint": "~8.47",
"eslint": "~8.49",
"jshint": "~2.13",
"mocha": "~10.2",
"npm-run-all2": "~6.0",
"rimraf": "~5.0",
"typescript": "~5.1"
"typescript": "~5.2"
}
}
10 changes: 7 additions & 3 deletions spec/mocha.spec.js
Expand Up @@ -34,9 +34,13 @@ describe('Library module', () => {
assertDeepStrictEqual(actual, expected);
});

it('has an exec() function', () => {
const actual = { validate: typeof runScripts.exec };
const expected = { validate: 'function' };
it('has functions named exec() and execParallel()', () => {
const module = runScripts;
const actual = Object.keys(module).sort().map(key => [key, typeof module[key]]);
const expected = [
['exec', 'function'],
['execParallel', 'function'],
];
assertDeepStrictEqual(actual, expected);
});

Expand Down

0 comments on commit d1a30ab

Please sign in to comment.