Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: don't error if Deno.bench() or Deno.test() are used in run subcommand #14946

Merged
merged 3 commits into from
Jun 24, 2022

Conversation

bartlomieju
Copy link
Member

Fixes #14862

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM.

I kind of wonder if it would have been good to throw with Deno.test originally in order to guide people to using the deno test sub command in case they use deno run, but it's probably pretty obvious when someone accidentally does that. Maybe not perfect for beginners, but not a big deal.

@bartlomieju
Copy link
Member Author

LGTM.

I kind of wonder if it would have been good to throw with Deno.test originally in order to guide people to using the deno test sub command in case they use deno run, but it's probably pretty obvious when someone accidentally does that. Maybe not perfect for beginners, but not a big deal.

Some people want to have testing code in the same file as the actual code. I think it makes sense for some one-off scripts or CLI tools.

@bartlomieju bartlomieju merged commit d390949 into denoland:main Jun 24, 2022
@bartlomieju bartlomieju deleted the fix_bench_test branch June 24, 2022 10:00
dsherret pushed a commit to dsherret/deno that referenced this pull request Jun 30, 2022
@nayeemrmn
Copy link
Collaborator

An error can still be seen for Deno.test() in deno bench and vice versa, since the switch is unified here.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ambiguous error with Deno.bench
3 participants