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

test(permissions/mod): Add invalid case #1314

Merged
merged 5 commits into from Sep 27, 2021
Merged

Conversation

wafuwafu13
Copy link
Contributor

@wafuwafu13 wafuwafu13 commented Sep 26, 2021

  • Changed filename test.ts -> mod_test.ts
  • Add invalid case

return grantOrThrow({ name: "nett" } as any);
},
TypeError,
'The provided value "nett" is not a valid permission name',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@caspervonb
Copy link
Contributor

Why rename?

@wafuwafu13
Copy link
Contributor Author

wafuwafu13 commented Sep 26, 2021

I was wondering if the names of the logic files corresponded to the names of the test files.
ex) fs/copy.ts <=> fs/copy_test.ts
But in the case of mod.ts, I didn't have to do that, so I put it back. 4a79746

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

@wafuwafu13 Thanks for your contribution. Left one comment

Deno.test({
name: "grantOrThrow invalid argument",
fn() {
assertThrowsAsync(
Copy link
Member

Choose a reason for hiding this comment

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

nit: assertThrowsAsync is now deprecated. Please use assertRejects instead

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

@wafuwafu13 LGTM. Thanks!

@kt3k kt3k merged commit 810f0e3 into denoland:main Sep 27, 2021
traceypooh pushed a commit to traceypooh/deno_std that referenced this pull request Nov 14, 2021
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.

None yet

3 participants