Skip to content

Commit

Permalink
correct import/export test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
powerpaul17 committed Oct 6, 2024
1 parent fce9fe6 commit e632d7d
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/stores/StorageManager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,17 @@ describe('StorageManager', () => {
const storageManager = useStorageManager();

expect(await storageManager.exportData()).to.deep.equal({
lastUpdatedAt: 100,
exportedAt: 100,
stores: {
test: {
version: 0,
lastUpdatedAt: 100,
entities: [{ id, testValue: 'test1', createdAt: 100, updatedAt: 100 }]
},
store2: {
version: 0,
lastUpdatedAt: 0,
entities: []
}
}
Expand All @@ -89,33 +94,45 @@ describe('StorageManager', () => {
const storageManager = useStorageManager();

await storageManager.importData({
lastUpdatedAt: 100,
exportedAt: 100,
stores: {
test: {
version: 0,
lastUpdatedAt: 0,
entities: []
},
store2: {
version: 0,
lastUpdatedAt: 100,
entities: [
{
id: '2-1',
testValue: 'test1-Store2'
testValue: 'test1-Store2',
updatedAt: 100
}
]
}
}
});

expect(await storageManager.exportData()).to.deep.equal({
lastUpdatedAt: 100,
exportedAt: 100,
stores: {
test: {
version: 0,
lastUpdatedAt: 0,
entities: []
},
store2: {
version: 0,
lastUpdatedAt: 100,
entities: [
{
id: '2-1',
testValue: 'test1-Store2'
testValue: 'test1-Store2',
updatedAt: 100
}
]
}
Expand Down

0 comments on commit e632d7d

Please sign in to comment.