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

feat: also export the type Test #57

Merged
merged 1 commit into from
Nov 2, 2020
Merged

feat: also export the type Test #57

merged 1 commit into from
Nov 2, 2020

Conversation

maraisr
Copy link
Contributor

@maraisr maraisr commented Nov 2, 2020

I want to share my tests. Kind of to create this partial concept. And for that, I would like my types to "accept" a Test type.

@codecov-io
Copy link

Codecov Report

Merging #57 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #57   +/-   ##
=======================================
  Coverage   90.16%   90.16%           
=======================================
  Files           3        3           
  Lines         305      305           
=======================================
  Hits          275      275           
  Misses         30       30           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30c10e0...2c358ae. Read the comment docs.

@@ -17,7 +17,10 @@ declare namespace uvu {
}

type Context = Record<string, any>;
export const test: uvu.Test<Context>;

export type Test<T=Context> = uvu.Test<T>;
Copy link
Owner

Choose a reason for hiding this comment

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

I didn't have this exposed because of the generic naming.
But now that it is, what do you think about using the Suite name instead, since that's what it is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mean you could argue the same thing with Callback. To me the suite, is the collection of test's (at least mentally), and a Test is the individual units. Seeing as suite() returns a uvu.Test it's only fitting to also export that type.

Its like you don't share suites, you share tests. I know its the same thing—but i still believe the naming her is right.

@lukeed lukeed merged commit 1772435 into lukeed:master Nov 2, 2020
@maraisr maraisr deleted the export-test-type branch November 2, 2020 23:04
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.

3 participants