mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-22 08:03:40 +00:00
fix(plugins): close companion placement gaps
This commit is contained in:
1 parent
f51e5b28e3
commit
a6e5b43d14
13 files changed
+222
-37
No files matched your search
@@ -238,6 +238,12 @@ test("resource-scoped required permissions must declare activation-time bounds",
|
||||
}));
|
||||
assert.equal(bounded.valid, true, bounded.errors.join("\n"));
|
||||
|
||||
const wildcard = validateManifestValue(manifest({
|
||||
permissions: { required: [{ permission, resources: ["*"] }] },
|
||||
}));
|
||||
assert.equal(wildcard.valid, false, permission);
|
||||
assert.match(wildcard.errors.join("\n"), /must not use the wildcard resource/u);
|
||||
|
||||
const optional = validateManifestValue(manifest({
|
||||
permissions: { optional: [permission] },
|
||||
}));
|
||||
@@ -252,9 +258,9 @@ test("manifest validation applies the runtime resource limit for each permission
|
||||
["companion.execute", 193, 192],
|
||||
] as const) {
|
||||
const result = validateManifestValue(manifest({
|
||||
permissions: {
|
||||
required: [{ permission, resources: ["x".repeat(length)] }],
|
||||
},
|
||||
permissions: permission === "storage"
|
||||
? { optional: [{ permission, resources: ["x".repeat(length)] }] }
|
||||
: { required: [{ permission, resources: ["x".repeat(length)] }] },
|
||||
}));
|
||||
assert.equal(result.valid, false);
|
||||
assert.match(
|
||||
|
||||
Reference in new issue
Block a user