From e97812c22a648f5b8c2e2544fa2b3d9f751340b7 Mon Sep 17 00:00:00 2001 From: Kanit Wongsuphasawat Date: Fri, 11 Oct 2024 12:44:09 -0700 Subject: [PATCH] fix test --- test/compile/format.test.ts | 8 ++++---- test/compile/mark/text.test.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/compile/format.test.ts b/test/compile/format.test.ts index ada7be09f4..291d528cf5 100644 --- a/test/compile/format.test.ts +++ b/test/compile/format.test.ts @@ -32,7 +32,7 @@ describe('Format', () => { format: '%Y', rawTimeFormat: defaultConfig.timeFormat }); - expect(expression).toBe(`timeFormat(datum["yearmonth_a"], '%Y')`); + expect(expression).toBe(`timeFormat(datum["yearmonth_a"], "%Y")`); }); it('should get the right time expression for quarter', () => { @@ -67,7 +67,7 @@ describe('Format', () => { rawTimeFormat: defaultConfig.timeFormat, isUTCScale: true }); - expect(expression).toBe(`utcFormat(datum["yearmonth_a"], '%Y')`); + expect(expression).toBe(`utcFormat(datum["yearmonth_a"], "%Y")`); }); it('should get the right time expression for with a custom timeFormatType', () => { @@ -77,7 +77,7 @@ describe('Format', () => { format: '%Y', formatType: 'customFormat' }); - expect(expression).toBe(`customFormat(datum["a"], '%Y')`); + expect(expression).toBe(`customFormat(datum["a"], "%Y")`); }); it('should prefer timeUnit over timeFormatType', () => { @@ -88,7 +88,7 @@ describe('Format', () => { timeUnit: 'date', formatType: 'customFormat' }); - expect(expression).toBe(`timeFormat(datum["date_a"], '%Y')`); + expect(expression).toBe(`timeFormat(datum["date_a"], "%Y")`); }); }); diff --git a/test/compile/mark/text.test.ts b/test/compile/mark/text.test.ts index 2da1adf086..237a27e48d 100644 --- a/test/compile/mark/text.test.ts +++ b/test/compile/mark/text.test.ts @@ -120,7 +120,7 @@ describe('Mark: Text', () => { const props = text.encodeEntry(model); it('should use date template', () => { - expect(props.text).toEqual({signal: `timeFormat(datum["foo"], '%b %d, %Y')`}); + expect(props.text).toEqual({signal: `timeFormat(datum["foo"], "%b %d, %Y")`}); }); });