Skip to content

Commit c73d965

Browse files
committed
Add failing test for the issue
1 parent 9c0c11a commit c73d965

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

src/config-utils.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2598,3 +2598,25 @@ test.serial("loadUserConfig - loads remote configuration files", async (t) => {
25982598
);
25992599
});
26002600
});
2601+
2602+
test.serial(
2603+
"loadUserConfig - loads remote configuration files (new format, partial)",
2604+
async (t) => {
2605+
await withTmpDir(async (tmpDir) => {
2606+
const getRemoteConfig = sinon.stub(file, "getRemoteConfig").resolves({});
2607+
2608+
const remoteAddress = "repo:file";
2609+
await callee(configUtils.loadUserConfig)
2610+
.withArgs(remoteAddress, tmpDir, SAMPLE_DOTCOM_API_DETAILS, tmpDir)
2611+
.passes(t.deepEqual, {});
2612+
2613+
t.true(
2614+
getRemoteConfig.calledOnceWithExactly(
2615+
sinon.match.any,
2616+
remoteAddress,
2617+
SAMPLE_DOTCOM_API_DETAILS,
2618+
),
2619+
);
2620+
});
2621+
},
2622+
);

0 commit comments

Comments
 (0)