+
@{partner.username}
-
+
+
{
+ assert.equal(
+ RemoteLocalTime({
+ partner: { timezone: 'Asia/Kolkata', show_local_time: false },
+ }),
+ null,
+ );
+ assert.equal(
+ RemoteLocalTime({ partner: { timezone: null, show_local_time: true } }),
+ null,
+ );
+
+ const result = RemoteLocalTime({
+ partner: { timezone: 'Asia/Kolkata', show_local_time: true },
+ });
+
+ assert.ok(
+ isValidElement<{
+ title: string;
+ children: ReactElement<{ timeZone: string }>;
+ }>(result),
+ );
+ assert.equal(result.props.title, 'Asia/Kolkata');
+ assert.equal(result.props.children.props.timeZone, 'Asia/Kolkata');
+});
diff --git a/tests/draft-images.config.ts b/tests/draft-images.config.ts
index 2696cc162..8a72e795c 100644
--- a/tests/draft-images.config.ts
+++ b/tests/draft-images.config.ts
@@ -12,6 +12,7 @@ export default defineConfig({
VITE_APP_NAME: '/dev/null',
},
include: [
+ 'tests/Unit/RemoteLocalTime.test.tsx',
'tests/Unit/CommitPhoto.test.tsx',
'tests/Unit/CommitSize.test.tsx',
'tests/Unit/ThreadHistory.test.tsx',
diff --git a/tests/tsconfig.json b/tests/tsconfig.json
index f27bb359f..c6255593a 100644
--- a/tests/tsconfig.json
+++ b/tests/tsconfig.json
@@ -6,6 +6,7 @@
},
"include": [
"Unit/**/*.test.ts",
+ "Unit/RemoteLocalTime.test.tsx",
"Unit/CommitPhoto.test.tsx",
"Unit/DraftStash.test.tsx",
"Unit/ComposerDraft.test.tsx",