Skip to content

Commit 6f2fe7b

Browse files
committed
fix failing unit test
1 parent e7d07af commit 6f2fe7b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/contentstack-import/test/unit/import/module-importer.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@ describe('ModuleImporter', () => {
2727
beforeEach(() => {
2828
sandbox = sinon.createSandbox();
2929

30-
// Setup mock stack client
30+
// Setup mock stack client (locale chain for masterLocalDetails when stub is bypassed in CI)
31+
const localeQueryFind = {
32+
find: sandbox.stub().resolves({ items: [{ code: 'en-us' }] }),
33+
};
34+
(localeQueryFind as any).query = sandbox.stub().returns(localeQueryFind);
3135
mockStackClient = {
3236
fetch: sandbox.stub().resolves({
3337
name: 'Test Stack',
3438
org_uid: 'org-123'
35-
})
39+
}),
40+
locale: sandbox.stub().returns(localeQueryFind),
3641
};
3742

3843
// Setup mock management client

0 commit comments

Comments
 (0)