You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe('Date field tests',()=>{letcollection: Collection<Shoe>beforeEach(async()=>{constdb=getClient(ProjectCatalog).getDatabase()collection=awaitdb.createOrUpdateCollection<Shoe>(Shoe)})it('deserialize date',async()=>{constdocs: Array<Shoe>=[{id: '1',purchaseDate: '2020-04-13T00:00:00.000+08:00',},]constinserted=awaitcollection.insertMany(docs)expect(inserted).toHaveLength(docs.length)constreadDoc=awaitcollection.findOne()expect(readDoc).toBeDefined()expect(readDoc?.inserted).toBeInstanceOf(Date)// all goodexpect(readDoc?.purchaseDate).not.toBeInstanceOf(Date)// This test failsexpect(readDoc?.purchaseDate).toBeInstanceOf(String)})})
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
You can find Tigris SDK version on your local dev project by executing npm list | grep "tigrisdata/core"
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Expected Behavior
For the above collection I expect
purchaseDate
to be string andinserted
to be a Date type in the retrieved document.Current Behavior
Both
inserted
andpurchaseDate
are of Date type.Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
For the following collection
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
^1.0.0-beta.50
Failure Logs
Please include any relevant log snippets or files here.
The text was updated successfully, but these errors were encountered: