Skip to content

Commit

Permalink
MMT-3903: destructuring and test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mandyparson committed Nov 14, 2024
1 parent 087f9d1 commit 481c925
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ import useAvailableProviders from '@/js/hooks/useAvailableProviders'

import TemplateForm from '../TemplateForm'

import staticConfig from '../../../../../../static.config.json'

const getConfig = () => staticConfig

const { ummVersions } = getConfig()

const { ummC: ummCVersion } = ummVersions

vi.mock('@/js/utils/createTemplate')
vi.mock('@/js/utils/errorLogger')
vi.mock('@/js/utils/getTemplate')
Expand Down Expand Up @@ -503,7 +511,7 @@ describe('TemplateForm', () => {
},
nativeId: 'MMT_mock-uuid',
providerId: 'MMT_2',
ummVersion: '1.18.1'
ummVersion: `${ummCVersion}`
}
},
result: {
Expand Down Expand Up @@ -557,7 +565,7 @@ describe('TemplateForm', () => {
},
nativeId: 'MMT_mock-uuid',
providerId: 'MMT_2',
ummVersion: '1.18.1'
ummVersion: `${ummCVersion}`
}
},
error: new Error('An error occurred')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ vi.mock('../../../utils/deleteTemplate')

const getConfig = () => staticConfig

const ummCVersion = getConfig().ummVersions.ummC
const { ummVersions } = getConfig()

const { ummC: ummCVersion } = ummVersions

const setup = () => {
const user = userEvent.setup()
Expand Down
4 changes: 3 additions & 1 deletion static/src/js/schemas/umm/ummCSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import staticConfig from '../../../../../static.config.json'

const getConfig = () => staticConfig

const ummCVersion = getConfig().ummVersions.ummC
const { ummVersions } = getConfig()

const { ummC: ummCVersion } = ummVersions

const ummCSchema = {
$schema: 'http://json-schema.org/draft-07/schema#',
Expand Down

0 comments on commit 481c925

Please sign in to comment.