Skip to content

Commit b59437e

Browse files
Cover in unit test that unmodeled and unsaved manual models are sorted together
1 parent 759f8d4 commit b59437e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

extensions/ql-vscode/test/unit-tests/model-editor/shared/sorting.test.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ describe("sortMethods", () => {
2222
signature: "org.sql2o.Sql2o#unsavedManualModel()",
2323
supported: false,
2424
});
25-
const unmodeledMethod = createMethod({
26-
signature: "org.sql2o.Sql2o#unmodeledMethod()",
25+
const unmodeledMethodWithEarlierSignature = createMethod({
26+
signature: "org.sql2o.Sql2o#aaa_unmodeledMethodWithEarlierSignature()",
27+
supported: false,
28+
});
29+
const unmodeledMethodWithLaterSignature = createMethod({
30+
signature: "org.sql2o.Sql2o#zzz_unmodeledMethodWithLaterSignature()",
2731
supported: false,
2832
});
2933
const savedAutoModelPrediction = createMethod({
@@ -43,7 +47,8 @@ describe("sortMethods", () => {
4347
unsavedPositiveAutoModelPrediction,
4448
negativeAutoModelPrediction,
4549
unsavedManualModel,
46-
unmodeledMethod,
50+
unmodeledMethodWithEarlierSignature,
51+
unmodeledMethodWithLaterSignature,
4752
savedAutoModelPrediction,
4853
savedManualModel,
4954
supportedMethod,
@@ -82,8 +87,9 @@ describe("sortMethods", () => {
8287
).toEqual([
8388
unsavedPositiveAutoModelPrediction,
8489
negativeAutoModelPrediction,
90+
unmodeledMethodWithEarlierSignature,
8591
unsavedManualModel,
86-
unmodeledMethod,
92+
unmodeledMethodWithLaterSignature,
8793
savedAutoModelPrediction,
8894
savedManualModel,
8995
supportedMethod,

0 commit comments

Comments
 (0)