Skip to content

Commit 1e7ea10

Browse files
committed
test: avoid map spread in migration test
1 parent f416053 commit 1e7ea10

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

src/commands/migrate.test.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,19 +1416,22 @@ describe("migrateApplyCommand", () => {
14161416
const warning =
14171417
"Codex app-backed plugins were planned without source app accessibility verification.";
14181418
const base = codexPluginPlan();
1419+
const items = [...base.items];
1420+
const gmailIndex = items.findIndex((item) => item.id === "plugin:gmail");
1421+
const gmailItem = items[gmailIndex];
1422+
if (!gmailItem) {
1423+
throw new Error("Expected gmail plugin item");
1424+
}
1425+
items[gmailIndex] = {
1426+
...gmailItem,
1427+
details: {
1428+
...gmailItem.details,
1429+
sourceAppVerification: "not_run",
1430+
},
1431+
};
14191432
const planned = codexPluginPlan({
14201433
warnings: [warning],
1421-
items: base.items.map((item) =>
1422-
item.id === "plugin:gmail"
1423-
? {
1424-
...item,
1425-
details: {
1426-
...item.details,
1427-
sourceAppVerification: "not_run",
1428-
},
1429-
}
1430-
: item,
1431-
),
1434+
items,
14321435
});
14331436
const logs: string[] = [];
14341437
const jsonRuntime: RuntimeEnv = {

0 commit comments

Comments
 (0)