Skip to content

Commit

Permalink
✅ Fix expression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Jun 9, 2022
1 parent 6a0e634 commit 5a62a85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const getXDomain = (
: undefined;

if (isHistogram && isFullyQualified(baseDomain)) {
if (xExtent) {
if (xExtent && !isTimeViz) {
return {
extendedDomain: {
min: xExtent.lowerBound ?? NaN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,12 @@ describe('XYChart component', () => {
{...defaultProps}
args={{
...args,
layers: [
{
...(args.layers[0] as DataLayerConfig),
isHistogram: true,
},
],
xExtent: {
type: 'axisExtentConfig',
mode: 'custom',
Expand All @@ -518,6 +524,7 @@ describe('XYChart component', () => {
expect(component.find(Settings).prop('xDomain')).toEqual({
min: 123,
max: 456,
minInterval: 50,
});
}
});
Expand Down

0 comments on commit 5a62a85

Please sign in to comment.