Jelajahi Sumber

test(email-plugin): Fix timezone-related test failure

Michael Bromley 6 tahun lalu
induk
melakukan
277754efc5

+ 1 - 1
packages/email-plugin/src/plugin.spec.ts

@@ -290,7 +290,7 @@ describe('EmailPlugin', () => {
 
             eventBus.publish(new MockEvent(ctx, true));
             await pause();
-            expect(onSend.mock.calls[0][0].body).toContain('Date: Wed Jan 01 2020 11:00:00');
+            expect(onSend.mock.calls[0][0].body).toContain('Date: Wed Jan 01 2020 10:00:00');
         });
 
         it('formateMoney', async () => {

+ 1 - 1
packages/email-plugin/test-templates/test-helpers/body.hbs

@@ -3,7 +3,7 @@
 <mj-section>
     <mj-column>
         <mj-text>Price: {{ formatMoney myPrice }}</mj-text>
-        <mj-text>Date: {{ formatDate myDate }}</mj-text>
+        <mj-text>Date: {{ formatDate myDate 'UTC:ddd mmm dd yyyy HH:MM:ss' }}</mj-text>
     </mj-column>
 </mj-section>