Skip to content

Commit

Permalink
test: remove reset test case for JsonStorage related test suites
Browse files Browse the repository at this point in the history
  • Loading branch information
danpacho committed Aug 9, 2024
1 parent 0074987 commit d4dd85a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
4 changes: 0 additions & 4 deletions packages/helpers/src/plugin/plugin.config.store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ describe('PluginConfigStore', () => {
name: 'plugin-config-store',
root,
})
it('should reset the store', async () => {
await store.reset()
expect(store.store).toEqual({})
})

it('should update plugin configurations', async () => {
const pluginName = 'myPlugin'
Expand Down
30 changes: 24 additions & 6 deletions packages/helpers/src/storage/json.storage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,36 @@ describe('JsonStorage', () => {
root,
})

it('should reset the storage', async () => {
await storage.reset()
expect(storage.storageRecord).toEqual({})
})

it('should create a new instance', () => {
expect(storage).toBeDefined()
})

it('should load the storage file', async () => {
await storage.load()
expect(storage.storageRecord).toEqual({})
expect(storage.storageRecord).toEqual({
key: {
key: {
key: {
key: 'value',
},
},
},
key2: {
key: {
key: {
key: 'value',
},
},
},
key3: {
key: {
key: {
key: 'value',
},
},
},
$$key$$: '__FUNCTION__:() => {\n return 1;\n }',
})
})

it('should set a value in the storage', async () => {
Expand Down

0 comments on commit d4dd85a

Please sign in to comment.