Add failing test for the issue

This commit is contained in:
Michael B. Gale
2026-07-14 20:11:33 +01:00
parent ca802991ba
commit 3ac40703e2

View File

@@ -2598,3 +2598,25 @@ test.serial("loadUserConfig - loads remote configuration files", async (t) => {
);
});
});
test.serial(
"loadUserConfig - loads remote configuration files (new format, partial)",
async (t) => {
await withTmpDir(async (tmpDir) => {
const getRemoteConfig = sinon.stub(file, "getRemoteConfig").resolves({});
const remoteAddress = "repo:file";
await callee(configUtils.loadUserConfig)
.withArgs(remoteAddress, tmpDir, SAMPLE_DOTCOM_API_DETAILS, tmpDir)
.passes(t.deepEqual, {});
t.true(
getRemoteConfig.calledOnceWithExactly(
sinon.match.any,
remoteAddress,
SAMPLE_DOTCOM_API_DETAILS,
),
);
});
},
);