Skip to content

Commit 6bba3ec

Browse files
committed
changed priorityQ key to string type
1 parent 5793a91 commit 6bba3ec

File tree

4 files changed

+204
-16
lines changed

4 files changed

+204
-16
lines changed

package-lock.json

Lines changed: 197 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@
2525
"jest": "^26.6.3",
2626
"ts-jest": "^26.4.3",
2727
"typescript": "^4.0.5"
28+
},
29+
"dependencies": {
30+
"mongoose": "^5.10.13"
2831
}
2932
}

src/__tests__/priorityQ.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ heap should always pop the same max as the array
88
*********************************************************/
99

1010
class testType {
11-
constructor(public id: number, public value: number) {}
11+
constructor(public id:string, public value: number) {}
1212
isGreaterThan(other: testType): boolean {
1313
return this.value > other.value;
1414
}
@@ -58,7 +58,7 @@ class PopCommand implements fc.Command<Model, PriorityQ<testType>> {
5858
const allCommands = [
5959
fc
6060
.record({
61-
id: fc.nat(),
61+
id: fc.string(),
6262
value: fc.integer(),
6363
})
6464
.map((v) => new PushCommand(new testType(v.id, v.value))),

0 commit comments

Comments
 (0)