Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add string-literal completion test for jsdoc
  • Loading branch information
sandersn committed Aug 4, 2016
commit e5973b8daa325344cf55b4c2840dd235e5e4e4f4
22 changes: 22 additions & 0 deletions tests/cases/fourslash/completionForStringLiteral4.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/// <reference path='fourslash.ts'/>
// @allowJs: true
// @Filename: in.js
/////** I am documentation
//// * @param {'literal'} p1
//// * @param {"literal"} p2
//// * @param {'other1' | 'other2'} p3
//// * @param {'literal' | number} p4
//// */
////function f(p1, p2, p3, p4) {
//// return p1 + p2 + p3 + p4 + '.';
////}
////f/*1*/('literal', 'literal', "o/*2*/ther1", 12);

goTo.marker('1');
verify.quickInfoExists();
verify.quickInfoIs('function f(p1: "literal", p2: "literal", p3: "other1" | "other2", p4: "literal" | number): string', 'I am documentation');

goTo.marker('2');
verify.completionListContains("other1");
verify.completionListContains("other2");
verify.memberListCount(2);