Skip to content

Commit affc307

Browse files
committed
fixed dates in test case
- test case likey failed due to date rounding
1 parent 124826a commit affc307

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spec/ParseQuery.Aggregate.spec.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1440,12 +1440,12 @@ describe('Parse.Query Aggregate testing', () => {
14401440
['location'],
14411441
'geoIndex',
14421442
false,
1443-
"2dsphere"
1443+
'2dsphere'
14441444
);
14451445
// Create objects
1446-
const obj1 = new TestObject({ value: 1, location: new Parse.GeoPoint(1, 1), date: new Date(1000) });
1447-
const obj2 = new TestObject({ value: 2, location: new Parse.GeoPoint(1, 1), date: new Date(2000) });
1448-
const obj3 = new TestObject({ value: 3, location: new Parse.GeoPoint(1, 1), date: new Date(3000) });
1446+
const obj1 = new TestObject({ value: 1, location: new Parse.GeoPoint(1, 1), date: new Date(1585353600000) });
1447+
const obj2 = new TestObject({ value: 2, location: new Parse.GeoPoint(1, 1), date: new Date(1585440000000) });
1448+
const obj3 = new TestObject({ value: 3, location: new Parse.GeoPoint(1, 1), date: new Date(1585526400000) });
14491449
await Parse.Object.saveAll([obj1, obj2, obj3]);
14501450
// Create query
14511451
const pipeline = [
@@ -1460,7 +1460,7 @@ describe('Parse.Query Aggregate testing', () => {
14601460
distanceField: 'dist',
14611461
query: {
14621462
date: {
1463-
$gte: new Date(2000)
1463+
$gte: new Date(1585440000000)
14641464
}
14651465
}
14661466
}

0 commit comments

Comments
 (0)