1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +08:00

fix tests

This commit is contained in:
lana-k
2025-10-03 22:13:33 +02:00
parent d3fbf08569
commit 6fbf75b601
7 changed files with 45 additions and 33 deletions

View File

@@ -71,7 +71,7 @@ describe('storedInquiries.js', () => {
query: 'SELECT * from foo',
viewType: 'chart',
viewOptions: [],
createdAt: new Date(2021, 0, 1),
createdAt: new Date(2021, 0, 1).toJSON(),
isPredefined: true
}
@@ -83,7 +83,8 @@ describe('storedInquiries.js', () => {
expect(copy).to.have.property('query').which.equal(base.query)
expect(copy).to.have.property('viewType').which.equal(base.viewType)
expect(copy).to.have.property('viewOptions').which.eql(base.viewOptions)
expect(copy).to.have.property('createdAt').which.within(now, nowPlusMinute)
expect(copy).to.have.property('createdAt')
expect(new Date(copy.createdAt)).within(now, nowPlusMinute)
expect(copy).to.not.have.property('isPredefined')
})