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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(testlab): add generic helper `skipOnTravis` #3040

Merged
merged 1 commit into from Jun 6, 2019

Conversation

Projects
None yet
2 participants
@bajtos
Copy link
Member

commented Jun 4, 2019

Introduce a generic helper skipOnTravis that supports arbitrary BDD verbs (it, describe, etc.) in a test-framework-agnostic way. Rework itSkippedOnTravis to leverage the new helper and deprecate it (in tsdocs only).

This is a follow-up for #3013.

Checklist

馃憠 Read and sign the CLA (Contributor License Agreement) 馃憟

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

馃憠 Check out how to submit a PR 馃憟

@bajtos bajtos requested review from raymondfeng and hacksparrow Jun 4, 2019

@bajtos bajtos self-assigned this Jun 4, 2019

@bajtos bajtos force-pushed the feat/generic-skip-on-travis branch from cd73ca5 to ab16360 Jun 4, 2019

@bajtos bajtos added the Testlab label Jun 4, 2019

* implementing the test.
*/
export function skipOnTravis<ARGS extends unknown[], RETVAL>(
verb: TestDefinition<ARGS, RETVAL> & {skip: TestDefinition<ARGS, RETVAL>},

This comment has been minimized.

Copy link
@raymondfeng

raymondfeng Jun 4, 2019

Member

Can we make verb default to it?

This comment has been minimized.

Copy link
@bajtos

bajtos Jun 6, 2019

Author Member

I prefer not to. Without the verb, it would be difficult to understand whether we are defining a test case (it()) or a test suite (describe()) or something else (context()).

skipOnTravis('returns some value when some conditions', async () => {
 // the test
});
feat(testlab): add generic helper `skipOnTravis`
Introduce a generic helper `skipOnTravis` that supports arbitrary
BDD verbs (`it`, `describe`, etc.) in a test-framework-agnostic way.

Rework `itSkippedOnTravis` to leverage the new helper and deprecate it
(in tsdocs only).

Signed-off-by: Miroslav Bajto拧 <mbajtoss@gmail.com>

@bajtos bajtos force-pushed the feat/generic-skip-on-travis branch from ab16360 to 392e850 Jun 6, 2019

@bajtos bajtos merged commit 3221d9f into master Jun 6, 2019

3 of 4 checks passed

coverage/coveralls Coverage decreased (-0.007%) to 91.878%
Details
clahub All contributors have signed the Contributor License Agreement.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@delete-merged-branch delete-merged-branch bot deleted the feat/generic-skip-on-travis branch Jun 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.