Skip to content

Commit

Permalink
fix test by not setting default min band size
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Jun 21, 2023
1 parent a3624ce commit 06f1e7b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 26 deletions.
43 changes: 28 additions & 15 deletions test/compile/mark/bar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ describe('Mark: Bar', () => {
x,
x2,
y: {type: 'quantitative', field: 'Acceleration', aggregate: 'mean'}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);
expect(props.x).toEqual({scale: 'x', field: 'bin_end'});
Expand Down Expand Up @@ -210,7 +211,8 @@ describe('Mark: Bar', () => {
y,
y2,
x: {type: 'quantitative', field: 'Acceleration', aggregate: 'mean'}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);
expect(props.y).toEqual({scale: 'y', field: 'bin_end', offset: 1});
Expand Down Expand Up @@ -323,7 +325,8 @@ describe('Mark: Bar', () => {
encoding: {
y,
x: {aggregate: 'mean', field: 'Acceleration', type: 'quantitative'}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand All @@ -346,7 +349,8 @@ describe('Mark: Bar', () => {
encoding: {
y,
x: {aggregate: 'mean', field: 'Acceleration', type: 'quantitative'}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand All @@ -369,7 +373,8 @@ describe('Mark: Bar', () => {
encoding: {
y,
x: {aggregate: 'mean', field: 'Acceleration', type: 'quantitative'}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand All @@ -394,7 +399,8 @@ describe('Mark: Bar', () => {
encoding: {
y,
x: {aggregate: 'mean', field: 'Acceleration', type: 'quantitative'}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand All @@ -413,7 +419,8 @@ describe('Mark: Bar', () => {
encoding: {
y,
x: {aggregate: 'mean', field: 'Acceleration', type: 'quantitative'}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand All @@ -433,7 +440,8 @@ describe('Mark: Bar', () => {
encoding: {
x,
y: {aggregate: 'mean', field: 'Acceleration', type: 'quantitative'}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand Down Expand Up @@ -474,7 +482,8 @@ describe('Mark: Bar', () => {
encoding: {
x,
y: {aggregate: 'mean', field: 'Acceleration', type: 'quantitative'}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand Down Expand Up @@ -532,7 +541,7 @@ describe('Mark: Bar', () => {
y,
x: {aggregate: 'mean', field: 'Acceleration', type: 'quantitative'}
},
config: {bar: {binSpacing: 0}}
config: {bar: {binSpacing: 0, minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand All @@ -552,7 +561,7 @@ describe('Mark: Bar', () => {
x,
y: {aggregate: 'mean', field: 'Acceleration', type: 'quantitative'}
},
config: {bar: {binSpacing: 0}}
config: {bar: {binSpacing: 0, minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand Down Expand Up @@ -1016,7 +1025,8 @@ describe('Mark: Bar', () => {
field: 'count',
type: 'quantitative'
}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand Down Expand Up @@ -1048,7 +1058,8 @@ describe('Mark: Bar', () => {
field: 'count',
type: 'quantitative'
}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand Down Expand Up @@ -1082,7 +1093,8 @@ describe('Mark: Bar', () => {
field: 'count',
type: 'quantitative'
}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand Down Expand Up @@ -1114,7 +1126,8 @@ describe('Mark: Bar', () => {
field: 'count',
type: 'quantitative'
}
}
},
config: {bar: {minBandSize: null}}
});
const props = bar.encodeEntry(model);

Expand Down
21 changes: 14 additions & 7 deletions test/compile/mark/encode/position-rect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ describe('compile/mark/encode/position-rect', () => {
type: 'quantitative',
scale: {reverse: {signal: 'r'}}
}
}
},
config: {bar: {minBandSize: null}}
});

const props = rectPosition(model, 'x');
Expand All @@ -37,7 +38,8 @@ describe('compile/mark/encode/position-rect', () => {
field: 'x',
type: 'quantitative'
}
}
},
config: {bar: {minBandSize: null}}
});

const props = rectPosition(model, 'x');
Expand All @@ -59,7 +61,8 @@ describe('compile/mark/encode/position-rect', () => {
type: 'quantitative',
scale: {reverse: {signal: 'r'}}
}
}
},
config: {bar: {minBandSize: null}}
});

const props = rectPosition(model, 'y');
Expand All @@ -82,7 +85,8 @@ describe('compile/mark/encode/position-rect', () => {
type: 'quantitative',
scale: {reverse: {signal: 'r'}}
}
}
},
config: {bar: {minBandSize: null}}
});

const props = rectPosition(model, 'x');
Expand All @@ -106,7 +110,8 @@ describe('compile/mark/encode/position-rect', () => {
type: 'quantitative',
scale: {reverse: {signal: 'r'}}
}
}
},
config: {bar: {minBandSize: null}}
});

const props = rectPosition(model, 'y');
Expand Down Expand Up @@ -173,7 +178,8 @@ describe('compile/mark/encode/position-rect', () => {
type: 'quantitative',
axis: {translate: {signal: 't'}}
}
}
},
config: {bar: {minBandSize: null}}
});
model.parseAxesAndHeaders();

Expand All @@ -198,7 +204,8 @@ describe('compile/mark/encode/position-rect', () => {
scale: {reverse: {signal: 'r'}},
axis: {translate: {signal: 't'}}
}
}
},
config: {bar: {minBandSize: null}}
});
model.parseAxesAndHeaders();

Expand Down
12 changes: 8 additions & 4 deletions test/compile/mark/rect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ describe('Mark: Rect', () => {
encoding: {
y,
x: {aggregate: 'mean', field: 'Acceleration', type: 'quantitative'}
}
},
config: {rect: {minBandSize: null}}
});
const props = rect.encodeEntry(model);

Expand All @@ -229,7 +230,8 @@ describe('Mark: Rect', () => {
encoding: {
x,
y: {aggregate: 'mean', field: 'Acceleration', type: 'quantitative'}
}
},
config: {rect: {minBandSize: null}}
});
const props = rect.encodeEntry(model);

Expand Down Expand Up @@ -300,7 +302,8 @@ describe('Mark: Rect', () => {
field: 'count',
type: 'quantitative'
}
}
},
config: {bar: {minBandSize: null}}
});
const props = rect.encodeEntry(model);

Expand Down Expand Up @@ -332,7 +335,8 @@ describe('Mark: Rect', () => {
field: 'count',
type: 'quantitative'
}
}
},
config: {bar: {minBandSize: null}}
});
const props = rect.encodeEntry(model);

Expand Down

0 comments on commit 06f1e7b

Please sign in to comment.