Skip to content

Commit f9c71c7

Browse files
committed
chore(tests): add disabled multi convert nested
1 parent b85ac5d commit f9c71c7

File tree

3 files changed

+79
-43
lines changed

3 files changed

+79
-43
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* some existing description
3+
* // more description to merge into the jsdoc
4+
// even more description to merge into the jsdoc
5+
* @param {number} index - ?
6+
* @param element - ?
7+
* @param simulateElement - ?
8+
*/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* some existing description
3+
* more description to merge into the jsdoc
4+
* even more description to merge into the jsdoc
5+
* @param {number} index - ?
6+
* @param element - ?
7+
* @param simulateElement - ?
8+
*/

test/suite/extension.test.ts

Lines changed: 63 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -880,51 +880,71 @@ describe("multi line jsdoc comment", () => {
880880
})
881881

882882
describe("convert", () => {
883-
describe(
884-
"selection not before or at end (internal)",
885-
itHasCorrectOutputAndSelectionPositions(
886-
"multiConvertLine.js",
887-
2,
888-
9,
889-
1,
890-
9,
891-
1,
892-
1,
893-
1,
894-
0,
895-
),
896-
)
883+
describe("when it's a line comment", () => {
884+
describe(
885+
"selection not before or at end (internal)",
886+
itHasCorrectOutputAndSelectionPositions(
887+
"multiConvertLine.js",
888+
2,
889+
9,
890+
1,
891+
9,
892+
1,
893+
1,
894+
1,
895+
0,
896+
),
897+
)
897898

898-
describe(
899-
"selection is before first non-whitespace char",
900-
itHasCorrectOutputAndSelectionPositions(
901-
"multiConvertLine.js",
902-
2,
903-
9,
904-
1,
905-
1,
906-
1,
907-
1,
908-
// TODO: consider not including JSDoc opening `/**` in selection and make next two params 1, 4
909-
0,
910-
0,
911-
),
912-
)
899+
describe(
900+
"selection is before first non-whitespace char",
901+
itHasCorrectOutputAndSelectionPositions(
902+
"multiConvertLine.js",
903+
2,
904+
9,
905+
1,
906+
1,
907+
1,
908+
1,
909+
// TODO: consider not including JSDoc opening `/**` in selection and make next two params 1, 4
910+
0,
911+
0,
912+
),
913+
)
913914

914-
describe(
915-
"selection starts at end",
916-
itHasCorrectOutputAndSelectionPositions(
917-
"multiConvertLine.js",
918-
2,
919-
15,
920-
1,
921-
9,
922-
1,
923-
1,
924-
1,
925-
0,
926-
),
927-
)
915+
describe(
916+
"selection starts at end",
917+
itHasCorrectOutputAndSelectionPositions(
918+
"multiConvertLine.js",
919+
2,
920+
15,
921+
1,
922+
9,
923+
1,
924+
1,
925+
1,
926+
0,
927+
),
928+
)
929+
930+
describe("when it's nested in JSDoc", () => {
931+
// TODO: can be improved by also aligning the comment
932+
describe.skip(
933+
"when some lines have a star proceeding them",
934+
itHasCorrectOutputAndSelectionPositions(
935+
"multiConvertLineNestedA.js",
936+
2,
937+
30,
938+
3,
939+
30,
940+
0,
941+
-2,
942+
0,
943+
-1,
944+
),
945+
)
946+
})
947+
})
928948
})
929949

930950
describe("remove", () => {

0 commit comments

Comments
 (0)