Skip to content

Commit 5d0cb96

Browse files
committed
Merge branch 'codex/app-dev-json' into codex/theme-dev-instance
2 parents 3ac827d + 087dc01 commit 5d0cb96

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

‎packages/app/src/cli/services/dev/ui.integration.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const statusUrl = new URL('./processes/dev-session/dev-session-status-manager.ts
1111
const postrunUrl = new URL('../../../../../cli-kit/src/public/node/hooks/postrun.ts', import.meta.url).href
1212
const sourceLoaderUrl = new URL('../../../../test/fixtures/app-source-loader.js', import.meta.url).href
1313
const tsconfigPath = fileURLToPath(new URL('../../../../test/fixtures/tsconfig.json', import.meta.url))
14+
// Windows starts PowerShell to enumerate and stop the remaining child processes.
15+
const postrunExitTimeoutMs = process.platform === 'win32' ? 15000 : 5000
1416

1517
// Windows process.kill() terminates immediately instead of delivering a catchable signal.
1618
// Exercise handlers on every platform and OS signal delivery where it is supported.
@@ -85,7 +87,10 @@ test.each(shutdownCases.flatMap((entry) => ['text', 'json'].map((mode) => ({...e
8587
process.stderr.write('Session cleaned up\\n')
8688
await hook.call({}, {config: {}, Command: {id: 'app:dev'}})
8789
process.stderr.write('Postrun completed\\n')
88-
setTimeout(() => process.exit(2), 5000)
90+
setTimeout(() => {
91+
process.stderr.write('Postrun shutdown timed out\\n')
92+
process.exit(2)
93+
}, ${postrunExitTimeoutMs})
8994
`
9095
const result = await captureOutputWithExitCode(
9196
process.execPath,

‎packages/cli/src/cli/commands/doc/fetch.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ describe('doc fetch command', () => {
156156
})
157157
const schema = JSON.parse(stdout())
158158
expect(schema.definitions.Result.anyOf).toHaveLength(2)
159-
expect(schema.definitions.Result.anyOf[0].properties.document.properties.content.type).toBe('string')
160-
expect(schema.definitions.Result.anyOf[1].properties.format.const).toBe('markdown')
159+
expect(schema.definitions.Result.anyOf[0].properties.document).toEqual({$ref: '#/definitions/Document'})
160+
expect(schema.definitions.Document.properties.content.type).toBe('string')
161+
expect(schema.definitions.Result.anyOf[1]).toEqual({$ref: '#/definitions/DocumentFile'})
162+
expect(schema.definitions.DocumentFile.properties.format.const).toBe('markdown')
161163
expect(stderr()).toBe('')
162164
expect(fetch).not.toHaveBeenCalled()
163165
})

‎packages/cli/src/cli/commands/doc/search.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,10 @@ describe('doc search command', () => {
177177
})
178178
const schema = JSON.parse(stdout())
179179
expect(schema.definitions.Result.required).toEqual(['results', 'pageInfo'])
180-
expect(schema.definitions.Result.properties.results.items.properties.domain.type).toEqual(['string', 'null'])
180+
expect(schema.definitions.Result.properties.results.items).toEqual({
181+
$ref: '#/definitions/DocumentationSearchEntry',
182+
})
183+
expect(schema.definitions.DocumentationSearchEntry.properties.domain.type).toEqual(['string', 'null'])
181184
expect(schema.definitions.Result.additionalProperties).toBe(false)
182185
expect(stderr()).toBe('')
183186
expect(shopifyFetch).not.toHaveBeenCalled()

0 commit comments

Comments
 (0)