Skip to content

Commit 480d695

Browse files
committed
fix:fix review
1 parent fbc38ef commit 480d695

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

packages/plugins/robot/test/composables/core/pageUpdater.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ vi.mock('../../../src/composables/core/useConfig', () => ({
6060
})
6161
}))
6262

63-
const baseSchema = () => ({
63+
const getBaseSchema = () => ({
6464
componentName: 'Page',
6565
props: {},
6666
state: {},
@@ -87,7 +87,7 @@ const addButtonPatch = () =>
8787
describe('pageUpdater', () => {
8888
beforeEach(async () => {
8989
vi.resetModules()
90-
canvasState.pageSchema = baseSchema()
90+
canvasState.pageSchema = getBaseSchema()
9191
canvasState.saved = true
9292
canvasState.imported = []
9393
canvasState.history = []
@@ -96,7 +96,7 @@ describe('pageUpdater', () => {
9696

9797
it('applies streaming updates without importing the whole schema', async () => {
9898
const { updatePageSchema } = await import('../../../src/composables/core/pageUpdater')
99-
const initialSchema = baseSchema()
99+
const initialSchema = getBaseSchema()
100100

101101
const result = await updatePageSchema(addButtonPatch(), initialSchema, false)
102102

@@ -111,7 +111,7 @@ describe('pageUpdater', () => {
111111

112112
it('imports and records history for final updates', async () => {
113113
const { updatePageSchema } = await import('../../../src/composables/core/pageUpdater')
114-
const initialSchema = baseSchema()
114+
const initialSchema = getBaseSchema()
115115

116116
const result = await updatePageSchema(addButtonPatch(), initialSchema, true)
117117

@@ -125,7 +125,7 @@ describe('pageUpdater', () => {
125125

126126
it('stores the last successful streaming schema as a final fallback', async () => {
127127
const { getLastSuccessfulPageSchema, updatePageSchema } = await import('../../../src/composables/core/pageUpdater')
128-
const initialSchema = baseSchema()
128+
const initialSchema = getBaseSchema()
129129

130130
await updatePageSchema(addButtonPatch(), initialSchema, false)
131131
const fallbackBeforeFinal = getLastSuccessfulPageSchema()
@@ -140,7 +140,7 @@ describe('pageUpdater', () => {
140140
const { getLastSuccessfulPageSchema, resetPageSchemaUpdateState, updatePageSchema } = await import(
141141
'../../../src/composables/core/pageUpdater'
142142
)
143-
const initialSchema = baseSchema()
143+
const initialSchema = getBaseSchema()
144144

145145
await updatePageSchema(addButtonPatch(), initialSchema, false)
146146
expect(getLastSuccessfulPageSchema()).toBeTruthy()
@@ -152,7 +152,7 @@ describe('pageUpdater', () => {
152152

153153
it('keeps the final schema after an earlier streaming update has completed', async () => {
154154
const { updatePageSchema } = await import('../../../src/composables/core/pageUpdater')
155-
const initialSchema = baseSchema()
155+
const initialSchema = getBaseSchema()
156156

157157
const streamingResult = await updatePageSchema(addButtonPatch(), initialSchema, false)
158158
const finalResult = await updatePageSchema(
@@ -178,7 +178,7 @@ describe('pageUpdater', () => {
178178

179179
it('rejects schemas containing invalid children nodes before touching canvas', async () => {
180180
const { updatePageSchema } = await import('../../../src/composables/core/pageUpdater')
181-
const initialSchema = baseSchema()
181+
const initialSchema = getBaseSchema()
182182

183183
const result = await updatePageSchema(
184184
JSON.stringify([
@@ -199,7 +199,7 @@ describe('pageUpdater', () => {
199199

200200
it('normalizes invalid methods before updating canvas', async () => {
201201
const { updatePageSchema } = await import('../../../src/composables/core/pageUpdater')
202-
const initialSchema = baseSchema()
202+
const initialSchema = getBaseSchema()
203203

204204
const result = await updatePageSchema(
205205
JSON.stringify([

0 commit comments

Comments
 (0)