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

build: Streamline mocha config #1905

Merged
merged 2 commits into from
May 2, 2022
Merged

Conversation

danielbankhead
Copy link
Member

@danielbankhead danielbankhead commented May 2, 2022

Adds support for native mocha config support - now we can use npx mocha without passing additional args/config

@danielbankhead danielbankhead requested review from a team as code owners May 2, 2022 18:21
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: storage Issues related to the googleapis/nodejs-storage API. labels May 2, 2022
@@ -26,13 +26,16 @@
"google storage",
"storage"
],
"mocha": {
Copy link
Contributor

Choose a reason for hiding this comment

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

What does moving this here vs the command line provide?

@@ -26,13 +26,16 @@
"google storage",
"storage"
],
"mocha": {
Copy link
Contributor

Choose a reason for hiding this comment

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

What does moving this here vs the command line provide?

Copy link
Member Author

Choose a reason for hiding this comment

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

It allows 2 things:

  • npx mocha <path-to-test(s)> without additional flags to type/remember
  • Easier IDE integration - IDEs no long require additional config in order to run mocha tests (which can change over time)

Copy link
Member Author

Choose a reason for hiding this comment

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

Add, if mocha is globally installed (npm i -g mocha) simply typing mocha in the CLI will run the default tests (same as npx mocha)

@danielbankhead
Copy link
Member Author

Additional note/context: Mocha merges the config file (.mocharc - owned by owl-bot/synthtool) and package.json#mocha (owned by us): https://mochajs.org/#merging

@danielbankhead danielbankhead merged commit 64bf0c9 into main May 2, 2022
@danielbankhead danielbankhead deleted the mocha-config-streamline branch May 2, 2022 20:31
danielbankhead added a commit that referenced this pull request May 6, 2022
* test: disable resumable upload in acl test before (#1903)

* build: Streamline `mocha` config (#1905)

* build: Streamline `mocha` config

* fix: Require `--require ts-node/register` first

* refactor: Misc cleanup

Co-authored-by: Denis DelGrosso <[email protected]>
ddelgrosso1 added a commit to ddelgrosso1/nodejs-storage that referenced this pull request May 23, 2022
* test: disable resumable upload in acl test before (googleapis#1903)

* build: Streamline `mocha` config (googleapis#1905)

* build: Streamline `mocha` config

* fix: Require `--require ts-node/register` first

* refactor: Misc cleanup

Co-authored-by: Denis DelGrosso <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants