MCPcopy Create free account
hub / github.com/electron-userland/electron-builder / assertSnapStructure

Function assertSnapStructure

test/src/linux/snapHeavyTest.ts:104–111  ·  view source on GitHub ↗

* Verify the extracted snap directory contains the expected structure. * Metadata lives at meta/snap.yaml (compiled by snapcraft, not the build-time snapcraft.yaml).

(primeDir: string, appName: string, binaryPath: string)

Source from the content-addressed store, hash-verified

102 * Metadata lives at meta/snap.yaml (compiled by snapcraft, not the build-time snapcraft.yaml).
103 */
104function assertSnapStructure(primeDir: string, appName: string, binaryPath: string): void {
105 const required = [path.join(primeDir, "meta", "snap.yaml"), path.join(primeDir, "meta", "gui", `${appName}.desktop`), binaryPath]
106 for (const p of required) {
107 if (!existsSync(p)) {
108 throw new Error(`Expected snap file not found: ${p}`)
109 }
110 }
111}
112
113/**
114 * Full install+launch integration test for a single snap.

Callers 1

runInstallLaunchTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected