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
Merged

Add test style guide #1918

merged 5 commits into from
Mar 15, 2019

Conversation

zekth
Copy link
Contributor

@zekth zekth commented Mar 12, 2019

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

website/style_guide.md Outdated Show resolved Hide resolved
website/style_guide.md Outdated Show resolved Hide resolved
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() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't thought about it but yes

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edited

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ry ry merged commit 23108b0 into denoland:master Mar 15, 2019
@zekth zekth deleted the style_guide branch June 16, 2019 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants