Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Sep 2, 2016

No description provided.

* `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
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
Copy link
Contributor

mhegazy commented Sep 2, 2016

👍

1 similar comment
@zhengbli
Copy link
Contributor

zhengbli commented Sep 2, 2016

👍

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