Skip to content

Commit e71c079

Browse files
committed
Fix: Added Tests for Locales module
1 parent 745936c commit e71c079

File tree

3 files changed

+902
-2
lines changed

3 files changed

+902
-2
lines changed

.talismanrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,6 @@ fileignoreconfig:
125125
checksum: 46fe0d1602ab386f7eaee9839bc376b98ab8d4262f823784eda9cfa2bf893758
126126
- filename: packages/contentstack-import/test/unit/import/modules/environments.test.ts
127127
checksum: 58165d06d92f55be8abb04c4ecc47df775a1c47f1cee529f1be5277187700f97
128+
- filename: packages/contentstack-import/test/unit/import/modules/locales.test.ts
129+
checksum: 011ec3efd7a29ed274f073c8678229eaef46f33e272e7e1db1206fa1a20383f0
128130
version: "1.0"

packages/contentstack-import/src/import/modules/locales.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export default class ImportLocales extends BaseClass {
163163

164164
const langUpdateRequest = this.stackAPIClient.locale(sourceMasterLanguage.code);
165165
langUpdateRequest.name = sourceMasterLanguage.name;
166-
await langUpdateRequest.update().catch(function (error: Error) {
166+
await langUpdateRequest.update().catch((error: Error) => {
167167
log.debug('Error updating master language name', this.config.context);
168168
handleAndLogError(error, { ...this.config.context });
169169
});
@@ -245,4 +245,4 @@ export default class ImportLocales extends BaseClass {
245245
concurrencyLimit: this.reqConcurrency,
246246
});
247247
}
248-
}
248+
}

0 commit comments

Comments
 (0)