Skip to content

Commit

Permalink
fix: plugin config storage test suites
Browse files Browse the repository at this point in the history
  • Loading branch information
danpacho committed Jul 22, 2024
1 parent 76468d1 commit de55bbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions packages/helpers/src/plugin/__fixtures__/storage.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"plugin": {
"staticConfig": {
"name": "value1",
"description": "value2"
},
"dynamicConfig": null
},
"myPlugin": {
"staticConfig": {
"name": "value1",
Expand Down
4 changes: 2 additions & 2 deletions packages/helpers/src/plugin/plugin.config.store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('PluginConfigStore', () => {
})

it('should add and retrieve plugin configurations', async () => {
const pluginName = 'myPlugin'
const pluginName = 'plugin'
const config = { name: 'value1', description: 'value2' }

await store.addConfig(pluginName, { staticConfig: config })
Expand Down Expand Up @@ -46,7 +46,7 @@ describe('PluginConfigStore', () => {
await store.addConfig(pluginName, { staticConfig: config })
await store.addConfig(pluginName, { staticConfig: config })

expect(Object.values(store.store).length).toBe(1)
expect(Object.values(store.store).length).toBe(2)

Check failure on line 49 in packages/helpers/src/plugin/plugin.config.store.test.ts

View workflow job for this annotation

GitHub Actions / total-test

helpers/src/plugin/plugin.config.store.test.ts > PluginConfigStore > should not add duplicate plugin configurations

AssertionError: expected 1 to be 2 // Object.is equality - Expected + Received - 2 + 1 ❯ helpers/src/plugin/plugin.config.store.test.ts:49:51
})

it('should inquire existing plugin configurations with args', async () => {
Expand Down

0 comments on commit de55bbd

Please sign in to comment.