Skip to content

test: add major version tests per fuse#90

Open
VerteDinde wants to merge 1 commit intomainfrom
add-fuse-tests
Open

test: add major version tests per fuse#90
VerteDinde wants to merge 1 commit intomainfrom
add-fuse-tests

Conversation

@VerteDinde
Copy link
Copy Markdown
Member

This PR adds additional tests for Electron fuses, which explicitly call out the major version in which each fuse was added and allows us to test the individual versions

@VerteDinde VerteDinde requested a review from a team as a code owner February 26, 2026 21:45
Comment on lines 130 to 150
it('should succeed when all fuse configurations are provided', async () => {
const electronPath = await getElectronLocally('41.0.0-beta.4', 'darwin', 'x64');
await expect(
flipFuses(electronPath, {
version: FuseVersion.V1,
strictlyRequireAllFuses: true,
[FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.EnableNodeCliInspectArguments]: true,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: true,
[FuseV1Options.GrantFileProtocolExtraPrivileges]: true,
[FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true,
[FuseV1Options.RunAsNode]: true,
[FuseV1Options.WasmTrapHandlers]: true,
}),
).resolves.toMatchInlineSnapshot(`1`);
// Actually flips a fuse
expect((await getCurrentFuseWire(electronPath))[FuseV1Options.EnableCookieEncryption]).toEqual(
FuseState.ENABLE,
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this test at this point since it duplicates the latest one at the bottom?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants