Skip to content

Commit 616d230

Browse files
committed
test(publish): cover app target propagation
1 parent ba120a3 commit 616d230

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

tests/versions.test.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,45 @@ describe('versionCommands.publish', () => {
161161
options: {
162162
versionId: '200',
163163
platform: 'android',
164+
appId: '100',
164165
versionDeps: expect.any(Object),
165166
warnDepsChanges: true,
166167
},
167168
});
168169
});
169170

171+
test('keeps an explicit appId through version creation and binding', async () => {
172+
await versionCommands.publish({
173+
args: ['bundle.ppk'],
174+
options: {
175+
platform: 'android',
176+
appId: '777',
177+
name: 'v1',
178+
packageVersion: '1.0.0',
179+
'no-interactive': true,
180+
},
181+
});
182+
183+
expect(getSelectedAppSpy).not.toHaveBeenCalled();
184+
expect(uploadFileSpy).toHaveBeenCalledWith(
185+
'bundle.ppk',
186+
undefined,
187+
'777',
188+
);
189+
expect(postSpy).toHaveBeenCalledWith(
190+
'/app/777/version/create',
191+
expect.any(Object),
192+
);
193+
expect(updateSpy).toHaveBeenCalledWith({
194+
options: expect.objectContaining({
195+
versionId: '200',
196+
platform: 'android',
197+
appId: '777',
198+
packageVersion: '1.0.0',
199+
}),
200+
});
201+
});
202+
170203
test('does not prompt for optional fields in no-interactive mode', async () => {
171204
await versionCommands.publish({
172205
args: ['bundle.ppk'],

0 commit comments

Comments
 (0)