Skip to content

Commit

Permalink
test: Removed redundant logic for the fake settings context
Browse files Browse the repository at this point in the history
  • Loading branch information
cmath10 committed Nov 1, 2024
1 parent 4a5b109 commit cd082a3
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions tests/__factory__.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,8 @@ export const createSettingsHostContext = (id: string) => {
: get(field)
},

set (field, value) {
switch (field) {
case 'order.templates.number.api':
data.order.templates.number.api = value as string | null
break
case 'order.templates.number.crm':
data.order.templates.number.crm = value as string | null
break
case 'system.locale':
data.system.locale = value as Locale
break
default:
throw new Error(`[crm:embed:host] Field ${field} is not supported in context ${id}`)
}
set () {
throw new Error(`[crm:embed:host] Context ${id} does not support setting fields`)
},

on (event, handler) {
Expand Down

0 comments on commit cd082a3

Please sign in to comment.