Skip to content

Commit ba7f38a

Browse files
committed
test: fix check
1 parent cb5465f commit ba7f38a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/integration/change-streams/change_stream.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ describe('Change Streams', function () {
170170
}
171171
});
172172

173-
it('contains a wallType date property on the change', {
173+
it('contains a wallTtime date property on the change', {
174174
metadata: { requires: { topology: 'replicaset', mongodb: '>=6.0.0' } },
175175
async test() {
176176
const collection = db.collection('wallTimeTest');
@@ -186,7 +186,10 @@ describe('Change Streams', function () {
186186
await changeStream.close();
187187

188188
expect(change).to.have.property('wallTime');
189-
expect(change.wallType).to.be.instanceOf(Date);
189+
// For cases where it's not undefined we check it's a Date.
190+
if (change.wallTime) {
191+
expect(change.wallType).to.be.instanceOf(Date);
192+
}
190193
}
191194
});
192195

0 commit comments

Comments
 (0)