1
- import { expect , jest , test } from '@jest/globals'
2
1
import { type PatchMutationOperation } from '@sanity/types'
2
+ import { expect , test , vi } from 'vitest'
3
3
4
4
import { Mutation } from '../src/document/Mutation'
5
5
import { SquashingBuffer } from '../src/document/SquashingBuffer'
@@ -113,7 +113,7 @@ test.each(['create', 'createIfNotExists', 'createOrReplace'])(
113
113
'%s defaults to current created at time' ,
114
114
( createFnc ) => {
115
115
const globalMockDate = new Date ( '2020-01-01T12:34:55.000Z' )
116
- const globalDateSpy = jest . spyOn ( global , 'Date' ) . mockReturnValue ( globalMockDate )
116
+ const globalDateSpy = vi . spyOn ( global , 'Date' ) . mockReturnValue ( globalMockDate )
117
117
118
118
const sb = new SquashingBuffer ( null )
119
119
@@ -140,7 +140,7 @@ test.each(['create', 'createIfNotExists', 'createOrReplace'])(
140
140
141
141
test ( 'de-duplicate create respects deletes' , ( ) => {
142
142
const globalMockDate = new Date ( '2020-01-01T12:34:55.000Z' )
143
- const globalDateSpy = jest . spyOn ( global , 'Date' ) . mockReturnValue ( globalMockDate )
143
+ const globalDateSpy = vi . spyOn ( global , 'Date' ) . mockReturnValue ( globalMockDate )
144
144
145
145
const initial = { _id : '1' , _type : 'test' , a : 'A string value' , c : 'Some value' }
146
146
const sb = new SquashingBuffer ( initial )
0 commit comments