1- import { describe , expect , it } from " vitest"
2- import { SortedMap } from " ../src/SortedMap"
3- import { BTreeIndex } from " ../src/indexes/btree-index"
4- import { createCollection } from " ../src/collection/index.js"
5- import { PropRef } from " ../src/query/ir"
6- import { mockSyncCollectionOptions } from " ./utils"
1+ import { describe , expect , it } from ' vitest'
2+ import { SortedMap } from ' ../src/SortedMap'
3+ import { BTreeIndex } from ' ../src/indexes/btree-index'
4+ import { createCollection } from ' ../src/collection/index.js'
5+ import { PropRef } from ' ../src/query/ir'
6+ import { mockSyncCollectionOptions } from ' ./utils'
77
88/**
99 * These tests verify deterministic ordering behavior when values compare as equal.
@@ -19,7 +19,7 @@ describe(`Deterministic Ordering`, () => {
1919 it ( `should maintain deterministic order when values are equal` , ( ) => {
2020 // All values are the same (priority = 1), so they compare as equal
2121 const map = new SortedMap < string , { priority : number } > (
22- ( a , b ) => a . priority - b . priority
22+ ( a , b ) => a . priority - b . priority ,
2323 )
2424
2525 // Insert in "random" order
@@ -34,7 +34,7 @@ describe(`Deterministic Ordering`, () => {
3434
3535 it ( `should maintain deterministic order with mixed equal and different values` , ( ) => {
3636 const map = new SortedMap < string , { priority : number } > (
37- ( a , b ) => a . priority - b . priority
37+ ( a , b ) => a . priority - b . priority ,
3838 )
3939
4040 // Mix of equal and different priorities
@@ -51,7 +51,7 @@ describe(`Deterministic Ordering`, () => {
5151
5252 it ( `should maintain deterministic order with numeric keys` , ( ) => {
5353 const map = new SortedMap < number , { priority : number } > (
54- ( a , b ) => a . priority - b . priority
54+ ( a , b ) => a . priority - b . priority ,
5555 )
5656
5757 map . set ( 30 , { priority : 1 } )
@@ -64,7 +64,7 @@ describe(`Deterministic Ordering`, () => {
6464
6565 it ( `should maintain deterministic order after updates` , ( ) => {
6666 const map = new SortedMap < string , { priority : number } > (
67- ( a , b ) => a . priority - b . priority
67+ ( a , b ) => a . priority - b . priority ,
6868 )
6969
7070 map . set ( `c` , { priority : 1 } )
@@ -80,7 +80,7 @@ describe(`Deterministic Ordering`, () => {
8080
8181 it ( `should maintain deterministic order after delete and re-insert` , ( ) => {
8282 const map = new SortedMap < string , { priority : number } > (
83- ( a , b ) => a . priority - b . priority
83+ ( a , b ) => a . priority - b . priority ,
8484 )
8585
8686 map . set ( `c` , { priority : 1 } )
@@ -113,7 +113,7 @@ describe(`Deterministic Ordering`, () => {
113113 const index = new BTreeIndex < string > (
114114 1 ,
115115 new PropRef ( [ `priority` ] ) ,
116- `priority_index`
116+ `priority_index` ,
117117 )
118118
119119 // All have same priority
@@ -130,7 +130,7 @@ describe(`Deterministic Ordering`, () => {
130130 const index = new BTreeIndex < string > (
131131 1 ,
132132 new PropRef ( [ `priority` ] ) ,
133- `priority_index`
133+ `priority_index` ,
134134 )
135135
136136 index . add ( `d` , { priority : 2 } )
@@ -148,7 +148,7 @@ describe(`Deterministic Ordering`, () => {
148148 const index = new BTreeIndex < number > (
149149 1 ,
150150 new PropRef ( [ `priority` ] ) ,
151- `priority_index`
151+ `priority_index` ,
152152 )
153153
154154 index . add ( 30 , { priority : 1 } )
@@ -163,7 +163,7 @@ describe(`Deterministic Ordering`, () => {
163163 const index = new BTreeIndex < string > (
164164 1 ,
165165 new PropRef ( [ `priority` ] ) ,
166- `priority_index`
166+ `priority_index` ,
167167 )
168168
169169 index . add ( `c` , { priority : 1 } )
@@ -179,7 +179,7 @@ describe(`Deterministic Ordering`, () => {
179179 const index = new BTreeIndex < string > (
180180 1 ,
181181 new PropRef ( [ `priority` ] ) ,
182- `priority_index`
182+ `priority_index` ,
183183 )
184184
185185 index . add ( `c` , { priority : 1 } )
@@ -197,7 +197,7 @@ describe(`Deterministic Ordering`, () => {
197197 const index = new BTreeIndex < string > (
198198 1 ,
199199 new PropRef ( [ `priority` ] ) ,
200- `priority_index`
200+ `priority_index` ,
201201 )
202202
203203 // Add keys with different priorities
0 commit comments