Skip to content

chore: add an npm test:once script #480

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

Merged
merged 1 commit into from
Mar 18, 2022
Merged

Conversation

lance
Copy link
Member

@lance lance commented Mar 17, 2022

Adds a convenience npm script that allows you to run only a single test
file at a time. Example usage:

sdk-javascript on ξ‚  lance/update-deps-package-json [!?] is πŸ“¦ v5.3.2 via  v16.14.0
❯ npm run test:one

> [email protected] test:one
> mocha --require ts-node/register

Error: No test files found

sdk-javascript on ξ‚  lance/update-deps-package-json [!?] is πŸ“¦ v5.3.2 via  v16.14.0
❯ npm run test:one -- ./test/integration/batch_test.ts

> [email protected] test:one
> mocha --require ts-node/register "./test/integration/batch_test.ts"

  A batched CloudEvent message over HTTP
    βœ” Can be created with a typed Message

  A batched CloudEvent message over Kafka
    βœ” Can be created with a typed Message

  2 passing (5ms)

sdk-javascript on ξ‚  lance/update-deps-package-json [!?] is πŸ“¦ v5.3.2 via  v16.14.0

Signed-off-by: Lance Ball [email protected]

Adds a convenience npm script that allows you to run only a single test
file at a time. Example usage:

```
sdk-javascript on ξ‚  lance/update-deps-package-json [!?] is πŸ“¦ v5.3.2 via  v16.14.0
❯ npm run test:one

> [email protected] test:one
> mocha --require ts-node/register

Error: No test files found

sdk-javascript on ξ‚  lance/update-deps-package-json [!?] is πŸ“¦ v5.3.2 via  v16.14.0
❯ npm run test:one -- ./test/integration/batch_test.ts

> [email protected] test:one
> mocha --require ts-node/register "./test/integration/batch_test.ts"

  A batched CloudEvent message over HTTP
    βœ” Can be created with a typed Message

  A batched CloudEvent message over Kafka
    βœ” Can be created with a typed Message

  2 passing (5ms)

sdk-javascript on ξ‚  lance/update-deps-package-json [!?] is πŸ“¦ v5.3.2 via  v16.14.0
```

Signed-off-by: Lance Ball <[email protected]>
@lance lance requested a review from a team March 17, 2022 20:06
@lance lance merged commit b4d7aa9 into cloudevents:main Mar 18, 2022
@lance lance deleted the lance/test-one branch March 18, 2022 03:10
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