Skip to content

Commit 2a27860

Browse files
committed
test(release): pin extension feed handoffs
1 parent 0189ebe commit 2a27860

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

packages/browseros-agent/scripts/release/release-extensions-workflow.test.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,17 @@ describe('release-extensions workflow', () => {
240240
'uv run --directory packages/browseros browseros \\',
241241
` release extensions "\${args[@]}"`,
242242
].join('\n')
243+
const commitCommand = [
244+
'packages/browseros-agent/scripts/release/commit-update-snapshot.sh \\',
245+
' "$DEFAULT_BRANCH" \\',
246+
` "chore(release): update extension \${feed_channel} feeds" \\`,
247+
` "\${snapshot_paths[@]}"`,
248+
].join('\n')
243249
const publishCommand = [
244250
'uv run --directory packages/browseros browseros \\',
245251
' release feeds publish-local \\',
252+
` "\${feed_keys[@]}" \\`,
253+
` "\${publish_flags[@]}"`,
246254
].join('\n')
247255
const channelLoopEnd = channelLoop.indexOf(
248256
'\n done\n\n if [ "$PUBLISH"',
@@ -272,16 +280,19 @@ describe('release-extensions workflow', () => {
272280
expect(transaction).toContain('commit-update-snapshot.sh')
273281
expect(transaction).toContain('release feeds publish-local')
274282
expect(transaction).toContain('--publish')
275-
expect(transaction).toContain('--allow-downgrade')
276283
expect(transaction).not.toContain('base_args+=(--publish)')
277284
expect(transaction).not.toContain('args+=(--publish)')
285+
expect(transaction).toContain('base_args+=(--allow-downgrade)')
286+
expect(transaction).toContain('publish_flags=(--publish)')
287+
expect(transaction).toContain('publish_flags+=(--allow-downgrade)')
278288
expect(channelLoop.indexOf(renderCommand)).toBeGreaterThanOrEqual(0)
289+
expect(channelLoop.indexOf(commitCommand)).toBeGreaterThanOrEqual(0)
279290
expect(channelLoop.indexOf(publishCommand)).toBeGreaterThanOrEqual(0)
280291
expect(channelLoopEnd).toBeGreaterThanOrEqual(0)
281292
expect(channelLoop.indexOf(renderCommand)).toBeLessThan(
282-
channelLoop.indexOf('commit-update-snapshot.sh'),
293+
channelLoop.indexOf(commitCommand),
283294
)
284-
expect(channelLoop.indexOf('commit-update-snapshot.sh')).toBeLessThan(
295+
expect(channelLoop.indexOf(commitCommand)).toBeLessThan(
285296
channelLoop.indexOf(publishCommand),
286297
)
287298
expect(channelLoop.indexOf(publishCommand)).toBeLessThan(channelLoopEnd)

0 commit comments

Comments
 (0)