Skip to content

Commit 863edba

Browse files
author
naman-contentstack
committed
updated test cases
1 parent 52237b8 commit 863edba

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

packages/contentstack-import/test/unit/utils/import-path-resolver.test.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ describe('Import Path Resolver', () => {
192192
delete (mockConfig as any).contentDir;
193193
(mockConfig as any).data = '/test/data';
194194
fileExistsSyncStub.withArgs('/test/data').returns(true);
195-
fileExistsSyncStub.withArgs(path.join('/test/data', 'export-info.json')).returns(false);
196195

197196
// Mock module types check
198197
defaultConfig.modules.types.forEach((moduleType) => {
@@ -238,11 +237,9 @@ describe('Import Path Resolver', () => {
238237
});
239238

240239
it('should return contentDir when module folders exist', async () => {
241-
const exportInfoPath = path.join('/test/content', 'export-info.json');
242240
const modulePath = path.join('/test/content', defaultConfig.modules.types[0]);
243241

244242
fileExistsSyncStub.withArgs('/test/content').returns(true);
245-
fileExistsSyncStub.withArgs(exportInfoPath).returns(false);
246243
fileExistsSyncStub.withArgs(modulePath).returns(true);
247244

248245
const result = await resolveImportPath(mockConfig, mockStackAPIClient);
@@ -338,15 +335,9 @@ describe('Import Path Resolver', () => {
338335

339336
it('should execute complete path resolution logic', async () => {
340337
const resolvedPath = path.join('/test/content', 'branch1');
341-
const exportInfoPath = path.join(resolvedPath, 'export-info.json');
342338

343339
fileExistsSyncStub.withArgs('/test/content').returns(true);
344340
fileExistsSyncStub.withArgs(resolvedPath).returns(true);
345-
fileExistsSyncStub.withArgs(exportInfoPath).returns(false);
346-
347-
// Mock export-info.json not found at contentDir
348-
const contentDirExportInfoPath = path.join('/test/content', 'export-info.json');
349-
fileExistsSyncStub.withArgs(contentDirExportInfoPath).returns(false);
350341

351342
// Mock module types check
352343
defaultConfig.modules.types.forEach((moduleType) => {

0 commit comments

Comments
 (0)