Skip to content

Commit 133968d

Browse files
committed
fix: update patch command tests for socket-patch v1.2.0 subcommands
- Replace 'info' test (removed command) with 'scan' (renamed from discover) - Replace 'discover' test with 'scan' (renamed) - Replace 'download' test with 'get' (download is alias) - Replace 'cleanup' test with 'repair' (renamed) - Replace 'rm' test with 'remove' (renamed) These changes align tests with socket-patch v1.2.0 command structure.
1 parent 92f1cca commit 133968d

File tree

3 files changed

+45
-105
lines changed

3 files changed

+45
-105
lines changed

packages/cli/test/integration/binary/js.test.mts

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -958,96 +958,76 @@ if (BINARY.enabled) {
958958
)
959959

960960
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
961-
'should display patch info help',
961+
'should display patch scan help',
962962
async () => {
963963
if (!binaryExists) {
964964
return
965965
}
966966

967-
const result = await executeCliCommand(['patch', 'info', '--help'], {
967+
const result = await executeCliCommand(['patch', 'scan', '--help'], {
968968
binPath: BINARY.path,
969969
isolateConfig: false,
970970
})
971971

972972
expect(result.code).toBe(0)
973-
expect(result.stdout).toContain('info')
973+
expect(result.stdout).toContain('scan')
974974
},
975975
)
976976

977977
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
978-
'should display patch discover help',
978+
'should display patch get help',
979979
async () => {
980980
if (!binaryExists) {
981981
return
982982
}
983983

984-
const result = await executeCliCommand(
985-
['patch', 'discover', '--help'],
986-
{
987-
binPath: BINARY.path,
988-
isolateConfig: false,
989-
},
990-
)
984+
const result = await executeCliCommand(['patch', 'get', '--help'], {
985+
binPath: BINARY.path,
986+
isolateConfig: false,
987+
})
991988

992989
expect(result.code).toBe(0)
993-
expect(result.stdout).toContain('discover')
990+
expect(result.stdout).toContain('get')
994991
},
995992
)
996993

997994
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
998-
'should display patch download help',
995+
'should display patch repair help',
999996
async () => {
1000997
if (!binaryExists) {
1001998
return
1002999
}
10031000

10041001
const result = await executeCliCommand(
1005-
['patch', 'download', '--help'],
1002+
['patch', 'repair', '--help'],
10061003
{
10071004
binPath: BINARY.path,
10081005
isolateConfig: false,
10091006
},
10101007
)
10111008

10121009
expect(result.code).toBe(0)
1013-
expect(result.stdout).toContain('download')
1010+
expect(result.stdout).toContain('repair')
10141011
},
10151012
)
10161013

10171014
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
1018-
'should display patch cleanup help',
1015+
'should display patch remove help',
10191016
async () => {
10201017
if (!binaryExists) {
10211018
return
10221019
}
10231020

10241021
const result = await executeCliCommand(
1025-
['patch', 'cleanup', '--help'],
1022+
['patch', 'remove', '--help'],
10261023
{
10271024
binPath: BINARY.path,
10281025
isolateConfig: false,
10291026
},
10301027
)
10311028

10321029
expect(result.code).toBe(0)
1033-
expect(result.stdout).toContain('cleanup')
1034-
},
1035-
)
1036-
1037-
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
1038-
'should display patch rm help',
1039-
async () => {
1040-
if (!binaryExists) {
1041-
return
1042-
}
1043-
1044-
const result = await executeCliCommand(['patch', 'rm', '--help'], {
1045-
binPath: BINARY.path,
1046-
isolateConfig: false,
1047-
})
1048-
1049-
expect(result.code).toBe(0)
1050-
expect(result.stdout).toContain('rm')
1030+
expect(result.stdout).toContain('remove')
10511031
},
10521032
)
10531033
})

packages/cli/test/integration/binary/sea.test.mts

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -952,96 +952,76 @@ if (BINARY.enabled) {
952952
)
953953

954954
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
955-
'should display patch info help',
955+
'should display patch scan help',
956956
async () => {
957957
if (!binaryExists) {
958958
return
959959
}
960960

961-
const result = await executeCliCommand(['patch', 'info', '--help'], {
961+
const result = await executeCliCommand(['patch', 'scan', '--help'], {
962962
binPath: BINARY.path,
963963
isolateConfig: false,
964964
})
965965

966966
expect(result.code).toBe(0)
967-
expect(result.stdout).toContain('info')
967+
expect(result.stdout).toContain('scan')
968968
},
969969
)
970970

971971
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
972-
'should display patch discover help',
972+
'should display patch get help',
973973
async () => {
974974
if (!binaryExists) {
975975
return
976976
}
977977

978-
const result = await executeCliCommand(
979-
['patch', 'discover', '--help'],
980-
{
981-
binPath: BINARY.path,
982-
isolateConfig: false,
983-
},
984-
)
978+
const result = await executeCliCommand(['patch', 'get', '--help'], {
979+
binPath: BINARY.path,
980+
isolateConfig: false,
981+
})
985982

986983
expect(result.code).toBe(0)
987-
expect(result.stdout).toContain('discover')
984+
expect(result.stdout).toContain('get')
988985
},
989986
)
990987

991988
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
992-
'should display patch download help',
989+
'should display patch repair help',
993990
async () => {
994991
if (!binaryExists) {
995992
return
996993
}
997994

998995
const result = await executeCliCommand(
999-
['patch', 'download', '--help'],
996+
['patch', 'repair', '--help'],
1000997
{
1001998
binPath: BINARY.path,
1002999
isolateConfig: false,
10031000
},
10041001
)
10051002

10061003
expect(result.code).toBe(0)
1007-
expect(result.stdout).toContain('download')
1004+
expect(result.stdout).toContain('repair')
10081005
},
10091006
)
10101007

10111008
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
1012-
'should display patch cleanup help',
1009+
'should display patch remove help',
10131010
async () => {
10141011
if (!binaryExists) {
10151012
return
10161013
}
10171014

10181015
const result = await executeCliCommand(
1019-
['patch', 'cleanup', '--help'],
1016+
['patch', 'remove', '--help'],
10201017
{
10211018
binPath: BINARY.path,
10221019
isolateConfig: false,
10231020
},
10241021
)
10251022

10261023
expect(result.code).toBe(0)
1027-
expect(result.stdout).toContain('cleanup')
1028-
},
1029-
)
1030-
1031-
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
1032-
'should display patch rm help',
1033-
async () => {
1034-
if (!binaryExists) {
1035-
return
1036-
}
1037-
1038-
const result = await executeCliCommand(['patch', 'rm', '--help'], {
1039-
binPath: BINARY.path,
1040-
isolateConfig: false,
1041-
})
1042-
1043-
expect(result.code).toBe(0)
1044-
expect(result.stdout).toContain('rm')
1024+
expect(result.stdout).toContain('remove')
10451025
},
10461026
)
10471027
})

packages/cli/test/integration/binary/smol.test.mts

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -958,96 +958,76 @@ if (BINARY.enabled) {
958958
)
959959

960960
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
961-
'should display patch info help',
961+
'should display patch scan help',
962962
async () => {
963963
if (!binaryExists) {
964964
return
965965
}
966966

967-
const result = await executeCliCommand(['patch', 'info', '--help'], {
967+
const result = await executeCliCommand(['patch', 'scan', '--help'], {
968968
binPath: BINARY.path,
969969
isolateConfig: false,
970970
})
971971

972972
expect(result.code).toBe(0)
973-
expect(result.stdout).toContain('info')
973+
expect(result.stdout).toContain('scan')
974974
},
975975
)
976976

977977
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
978-
'should display patch discover help',
978+
'should display patch get help',
979979
async () => {
980980
if (!binaryExists) {
981981
return
982982
}
983983

984-
const result = await executeCliCommand(
985-
['patch', 'discover', '--help'],
986-
{
987-
binPath: BINARY.path,
988-
isolateConfig: false,
989-
},
990-
)
984+
const result = await executeCliCommand(['patch', 'get', '--help'], {
985+
binPath: BINARY.path,
986+
isolateConfig: false,
987+
})
991988

992989
expect(result.code).toBe(0)
993-
expect(result.stdout).toContain('discover')
990+
expect(result.stdout).toContain('get')
994991
},
995992
)
996993

997994
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
998-
'should display patch download help',
995+
'should display patch repair help',
999996
async () => {
1000997
if (!binaryExists) {
1001998
return
1002999
}
10031000

10041001
const result = await executeCliCommand(
1005-
['patch', 'download', '--help'],
1002+
['patch', 'repair', '--help'],
10061003
{
10071004
binPath: BINARY.path,
10081005
isolateConfig: false,
10091006
},
10101007
)
10111008

10121009
expect(result.code).toBe(0)
1013-
expect(result.stdout).toContain('download')
1010+
expect(result.stdout).toContain('repair')
10141011
},
10151012
)
10161013

10171014
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
1018-
'should display patch cleanup help',
1015+
'should display patch remove help',
10191016
async () => {
10201017
if (!binaryExists) {
10211018
return
10221019
}
10231020

10241021
const result = await executeCliCommand(
1025-
['patch', 'cleanup', '--help'],
1022+
['patch', 'remove', '--help'],
10261023
{
10271024
binPath: BINARY.path,
10281025
isolateConfig: false,
10291026
},
10301027
)
10311028

10321029
expect(result.code).toBe(0)
1033-
expect(result.stdout).toContain('cleanup')
1034-
},
1035-
)
1036-
1037-
it.skipIf(!ENV.RUN_INTEGRATION_TESTS)(
1038-
'should display patch rm help',
1039-
async () => {
1040-
if (!binaryExists) {
1041-
return
1042-
}
1043-
1044-
const result = await executeCliCommand(['patch', 'rm', '--help'], {
1045-
binPath: BINARY.path,
1046-
isolateConfig: false,
1047-
})
1048-
1049-
expect(result.code).toBe(0)
1050-
expect(result.stdout).toContain('rm')
1030+
expect(result.stdout).toContain('remove')
10511031
},
10521032
)
10531033
})

0 commit comments

Comments
 (0)