Skip to content

Commit 1e43b89

Browse files
committed
Add explicit errors to test
1 parent 1c90347 commit 1e43b89

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

packages/snaps-utils/src/manifest/manifest.test.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,34 @@ describe('checkManifest', () => {
188188

189189
expect(files?.manifest.result).toStrictEqual(defaultManifest);
190190
expect(updated).toBe(true);
191+
191192
expect(unfixed).toHaveLength(1);
193+
expect(unfixed).toContainEqual({
194+
id: 'production-platform-version',
195+
severity: 'warning',
196+
message: expect.stringContaining(
197+
'The current maximum supported version is "1.0.0". To resolve this, downgrade `@metamask/snaps-sdk` to a compatible version.',
198+
),
199+
});
200+
192201
expect(fixed).toHaveLength(2);
202+
expect(fixed).toContainEqual({
203+
id: 'platform-version-missing',
204+
severity: 'error',
205+
message: expect.stringContaining(
206+
'The "platformVersion" field is missing from the manifest.',
207+
),
208+
wasFixed: true,
209+
});
210+
211+
expect(fixed).toContainEqual({
212+
id: 'checksum',
213+
severity: 'error',
214+
message: expect.stringContaining(
215+
'"snap.manifest.json" "shasum" field does not match computed shasum.',
216+
),
217+
wasFixed: true,
218+
});
193219

194220
const file = await readJsonFile<SnapManifest>(MANIFEST_PATH);
195221
const { source, version } = file.result;

0 commit comments

Comments
 (0)