Skip to content

Commit

Permalink
Add tests fir membership infering for methods
Browse files Browse the repository at this point in the history
  • Loading branch information
NumminorihSF committed Aug 20, 2018
1 parent 5a504a2 commit 3059f0b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions __tests__/lib/infer/membership.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,38 @@ test('inferMembership - explicit', function() {
scope: 'instance'
});

expect(
pick(
evaluate(function() {
/** @memberof bar */
class Foo {
/** */
baz() {}
}
})[1], // [0] is an description for class Foo
['memberof', 'scope']
)
).toEqual({
memberof: 'bar.Foo',
scope: 'instance'
});

expect(
pick(
evaluate(function() {
/** @memberof bar */
class Foo {
/** */
static baz() {}
}
})[1], // [0] is an description for class Foo
['memberof', 'scope']
)
).toEqual({
memberof: 'bar.Foo',
scope: 'static'
});

expect(
pick(
evaluate(function() {
Expand Down

0 comments on commit 3059f0b

Please sign in to comment.