Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Simplify go-to-definition tests#10686

Merged
2 commits merged into
mastermicrosoft/TypeScript:masterfrom
go_to_definition_testsmicrosoft/TypeScript:go_to_definition_testsCopy head branch name to clipboard
Sep 2, 2016
Merged

Simplify go-to-definition tests#10686
2 commits merged into
mastermicrosoft/TypeScript:masterfrom
go_to_definition_testsmicrosoft/TypeScript:go_to_definition_testsCopy head branch name to clipboard

Conversation

@ghost

@ghost ghost commented Sep 2, 2016

Copy link
Copy Markdown

No description provided.

Comment thread tests/cases/fourslash/fourslash.ts Outdated
* `verify.goToDefinition("a", "b");` verifies that go-to-definition at marker "a" takes you to marker "b".
* `verify.goToDefinition(["a", "aa"], "b");` verifies that markers "a" and "aa" have the same definition "b".
* `verify.goToDefinition("a", ["b", "bb"]);` verifies that "a" has multiple definitions available.
* Finally, `verify.goToDefinition("a", "b", "c", "d");` is just `verify.goToDefinition("a", "b"); verify.goToDefinition("c", "d");`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this overload looks a bit ambiguous to me in the tests. i had to read the docs to know what it meant. consider adding a different method for it, or just writing it in the tests as multiple calls to goToDefinition.

@mhegazy

mhegazy commented Sep 2, 2016

Copy link
Copy Markdown
Contributor

👍

1 similar comment
@zhengbli

zhengbli commented Sep 2, 2016

Copy link
Copy Markdown

👍

Use explicit pairs `verify.goToDefinition([["a", "b"], ["c", "d"]])` instead of `verify.goToDefinition("a", "b", "c", "d")`.
Also provide an option `verify.goToDefinition({ a: "b", c: "d" })` for cases where the starts are not theirselves lists.
@ghost ghost force-pushed the go_to_definition_tests branch from 5ab17d0 to c75f6d0 Compare September 2, 2016 20:23
@ghost ghost merged commit 32b6746 into master Sep 2, 2016
@ghost ghost deleted the go_to_definition_tests branch September 2, 2016 20:43
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.