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

Add test style guide #1918

Merged
merged 5 commits into from Mar 15, 2019

Conversation

2 participants
@zekth
Copy link
Contributor

zekth commented Mar 12, 2019

Improving style guide for tests as mentionned in : denoland/deno_std#130

zekth added some commits Mar 12, 2019

Show resolved Hide resolved website/style_guide.md Outdated
Show resolved Hide resolved website/style_guide.md Outdated
import { assertStrContains } from "https://deno.land/std@v0.3.1/testing/asserts.ts";
import { test } from "https://deno.land/std@v0.3.1/testing/mod.ts";
test(function testingAssertStringContains() {

This comment has been minimized.

@ry

ry Mar 12, 2019

Collaborator

Maybe the name of the function here should correspond to the output you give above?

This comment has been minimized.

@zekth

zekth Mar 13, 2019

Author Contributor

Didn't thought about it but yes

} catch (e) {
didThrow = true;
}
assertEquals(didThrow, true);

This comment has been minimized.

@ry

ry Mar 13, 2019

Collaborator

Please use a smaller one line example with just a single assertEquals... I think all this code distracts from the point the style guide is making. This isn't documentation.

This comment has been minimized.

@zekth

zekth Mar 13, 2019

Author Contributor

edited

@ry

ry approved these changes Mar 15, 2019

Copy link
Collaborator

ry left a comment

LGTM

@ry ry merged commit 23108b0 into denoland:master Mar 15, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build 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.