Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Oct 11, 2024
1 parent 6e123f9 commit e97812c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions test/compile/format.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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', () => {
Expand All @@ -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', () => {
Expand All @@ -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")`);
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/compile/mark/text.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")`});
});
});

Expand Down

0 comments on commit e97812c

Please sign in to comment.