test: clone VM results across Electron boundaries

- Clone tokenizer VM results into the host realm
- Expect null-prototype profile maps in IPC validation tests
This commit is contained in:
2026-09-11 01:55:32 -07:00
parent 6d69a56574
commit e6dc9dfec5
3 changed files with 13 additions and 4 deletions
+7 -1
View File
@@ -1037,7 +1037,13 @@ test('registerIpcHandlers accepts per-controller profile config updates', async
},
};
await saveHandler({}, update);
assert.deepEqual(controllerSaves, [update]);
assert.deepEqual(controllerSaves, [
{
...update,
// Validation uses a null prototype to safely store arbitrary profile IDs.
profiles: { __proto__: null, ...update.profiles },
},
]);
await assert.rejects(async () => {
await saveHandler(