Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 11325c8

Browse files
committed
✅ Add spec for JSDoc parameter properties
1 parent 0b56f70 commit 11325c8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/javascript-spec.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,11 @@ describe "Javascript grammar", ->
15191519
expect(tokens[6]).toEqual value: '[variable=default value]', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'variable.other.jsdoc']
15201520
expect(tokens[8]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
15211521

1522+
{tokens} = grammar.tokenizeLine('/** @param {object} parameter.property this is the description */')
1523+
expect(tokens[4]).toEqual value: '{object}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
1524+
expect(tokens[6]).toEqual value: 'parameter.property', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'variable.other.jsdoc']
1525+
expect(tokens[8]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
1526+
15221527
it "tokenizes // comments", ->
15231528
{tokens} = grammar.tokenizeLine('// comment')
15241529
expect(tokens[0]).toEqual value: '//', scopes: ['source.js', 'comment.line.double-slash.js', 'punctuation.definition.comment.js']

0 commit comments

Comments
 (0)