


























@@ -67,7 +67,7 @@ describe("current plugin metadata snapshot", () => {
6767expect(getCurrentPluginMetadataSnapshot({ config, workspaceDir: "/workspace/a" })).toBe(
6868snapshot,
6969);
70-expect(getCurrentPluginMetadataSnapshot({ config })).toBe(snapshot);
70+expect(getCurrentPluginMetadataSnapshot({ config })).toBeUndefined();
7171expect(
7272getCurrentPluginMetadataSnapshot({
7373config: { plugins: { allow: ["other"] } },
@@ -79,6 +79,14 @@ describe("current plugin metadata snapshot", () => {
7979).toBeUndefined();
8080});
818182+it("rejects a workspace-scoped snapshot when the caller does not provide workspace scope", () => {
83+const config = { plugins: { allow: ["demo"] } };
84+const snapshot = createSnapshot({ config, workspaceDir: "/workspace/a" });
85+setCurrentPluginMetadataSnapshot(snapshot, { config });
86+87+expect(getCurrentPluginMetadataSnapshot({ config })).toBeUndefined();
88+});
89+8290it("rejects a current snapshot when plugin load paths change", () => {
8391const config = { plugins: { load: { paths: ["/plugins/one"] } } };
8492const snapshot = createSnapshot({ config });
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。