Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: parallel testing #224

Merged
merged 1 commit into from Mar 4, 2019

Conversation

4 participants
@chiefbiiko
Copy link
Contributor

chiefbiiko commented Mar 2, 2019

Defaults to serial execution.
Test parallel with runTests({ parallel: true }).
Run deno ./testing/bench.ts for a simple comparison.

@chiefbiiko chiefbiiko force-pushed the chiefbiiko:master branch from 8439380 to b79b003 Mar 2, 2019

}

export interface RunOptions {
serial?: boolean;

This comment has been minimized.

@j-f1

j-f1 Mar 2, 2019

Why not pass parallel: true instead of serial: false?

This comment has been minimized.

@ry

ry Mar 2, 2019

Contributor

I agree, this seems more intuitive.

This comment has been minimized.

@chiefbiiko

chiefbiiko Mar 3, 2019

Author Contributor

Thanks for the feedback, now parallel.

@zekth

This comment has been minimized.

Copy link
Contributor

zekth commented Mar 2, 2019

Would it be better to set a value { concurrent: true } instead of { serial: false }. In term of common usage in testing it has more sense to set a flag of the execution?

for (let i = 0; i < tests.length; i++) {
const { fn, name } = tests[i];
let result = green_ok();
export async function runIfMain(meta: ImportMeta, opts?: RunOptions) {

This comment has been minimized.

@ry

ry Mar 2, 2019

Contributor

Add jsdocs here explaining the defaults.

This comment has been minimized.

@chiefbiiko

chiefbiiko Mar 3, 2019

Author Contributor

updated

@chiefbiiko chiefbiiko force-pushed the chiefbiiko:master branch from b79b003 to 6528ad9 Mar 3, 2019

@chiefbiiko chiefbiiko force-pushed the chiefbiiko:master branch from 6528ad9 to c5be8e7 Mar 3, 2019

@ry

ry approved these changes Mar 4, 2019

Copy link
Contributor

ry left a comment

LGTM - thanks!

@ry ry merged commit 41bdd09 into denoland:master Mar 4, 2019

2 checks passed

denoland.deno_std #20190303.1 succeeded
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.