
























@@ -218,10 +218,10 @@ describe("setup-registry module loader", () => {
218218}
219219220220expect(mocks.createJiti).toHaveBeenCalledTimes(1);
221-expect(mocks.createJiti.mock.calls[0]?.[0]).toBe(
221+expect(mocks.createJiti.mock.calls.at(0)?.[0]).toBe(
222222pathToFileURL(path.join(pluginRoot, "setup-api.js"), { windows: true }).href,
223223);
224-expect(requireRecord(mocks.createJiti.mock.calls[0]?.[1]).tryNative).toBe(true);
224+expect(requireRecord(mocks.createJiti.mock.calls.at(0)?.[1]).tryNative).toBe(true);
225225});
226226227227it("passes explicit plugin id scope into setup manifest reads", () => {
@@ -238,9 +238,9 @@ describe("setup-registry module loader", () => {
238238});
239239240240expect(mocks.loadPluginManifestRegistry).toHaveBeenCalledTimes(1);
241-expect(requireRecord(mocks.loadPluginManifestRegistry.mock.calls[0]?.[0]).pluginIds).toEqual([
242-"test-plugin",
243-]);
241+expect(requireRecord(mocks.loadPluginManifestRegistry.mock.calls.at(0)?.[0]).pluginIds).toEqual(
242+["test-plugin"],
243+);
244244});
245245246246it("skips setup-api loading when config has no relevant migration triggers", () => {
@@ -338,7 +338,7 @@ describe("setup-registry module loader", () => {
338338339339expect(result.changes).toEqual(["amazon-bedrock"]);
340340expect(mocks.createJiti).toHaveBeenCalledTimes(1);
341-expect(mocks.createJiti.mock.calls[0]?.[0]).toBe(path.join(bedrockRoot, "setup-api.js"));
341+expect(mocks.createJiti.mock.calls.at(0)?.[0]).toBe(path.join(bedrockRoot, "setup-api.js"));
342342});
343343344344it("still loads explicitly configured plugin entries without manifest trigger metadata", () => {
@@ -403,7 +403,7 @@ describe("setup-registry module loader", () => {
403403expect(provider.label).toBe("Amazon Bedrock");
404404expect(resolvePluginSetupProvider({ provider: "legacy-bedrock", env: {} })).toBeUndefined();
405405expect(mocks.createJiti).toHaveBeenCalledTimes(1);
406-expect(mocks.createJiti.mock.calls[0]?.[0]).toBe(path.join(pluginRoot, "setup-api.js"));
406+expect(mocks.createJiti.mock.calls.at(0)?.[0]).toBe(path.join(pluginRoot, "setup-api.js"));
407407});
408408409409it("treats explicit descriptor-only setup as a runtime cutoff", () => {
@@ -632,7 +632,7 @@ describe("setup-registry module loader", () => {
632632expect(second).toEqual(first);
633633expect(resolvePluginSetupCliBackend({ backend: "legacy-openai-cli", env: {} })).toBeUndefined();
634634expect(mocks.createJiti).toHaveBeenCalledTimes(1);
635-expect(mocks.createJiti.mock.calls[0]?.[0]).toBe(path.join(openaiRoot, "setup-api.js"));
635+expect(mocks.createJiti.mock.calls.at(0)?.[0]).toBe(path.join(openaiRoot, "setup-api.js"));
636636});
637637638638it("keeps synchronously registered cli backends even when register returns a promise", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。