-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Make test context optionally type aware for TypeScript #1298
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c55923a
Make test context (optionally) type aware.
mmkal 2b9857f
lint: Use property shorthand
mmkal e030d81
Get rid of contextualize; it's not necessary
mmkal 32bba3d
Make TestContext generic rather than Contextual.
mmkal 9a3d5f0
Reintroduce types ContextualTest and ContextualCallbackTest
mmkal 6de1948
Add newline to end of gitignore
mmkal f8d9229
Use types instead of namespaces.
mmkal 9fb9e17
Make the default export a properly defined type
mmkal 44d8d90
Make default export a narrowing of a generic type
mmkal de19e57
More flexible generics
mmkal d3a5981
Even more flexible generics
mmkal 909670e
Get rid of dead code
mmkal fa35b08
Lint fixes
mmkal fe7d3c9
Another trailing space somehow snuck in
mmkal 297f723
More make.js comments & switch to interfaces.
mmkal d11918a
Make Context<T> an interface
mmkal dfb9d62
Make TestFunction an interface
mmkal e8148a0
Rename TestFunction to Register.
584092b
Add usage example to TypeScript recipe doc.
fae6023
Add TypeScript >= 2.1 requirement to recipe.
b6e1125
Make 'Test context' a lower-status heading.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
export type ContextualTest = GenericTest<{ context: any }>;
, otherwise this might break some users. Same forContextualCallbackTest