Skip to content

Commit

Permalink
fix: config test
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed May 16, 2024
1 parent f063568 commit d736c58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,10 @@ export function initConfig(specifiedConfig: Config = {}): Config<SignalRef> {

if (mergedConfig.scale) {
const {invalid, ...otherScaleConfig} = mergedConfig.scale;
const newScaleInvalid = replaceExprRef(invalid, {level: 1});
outputConfig.scale = {
...replaceExprRef(otherScaleConfig),
invalid: replaceExprRef(invalid, {level: 1})
...(keys(newScaleInvalid).length > 0 ? {invalid: newScaleInvalid} : {})
};
}

Expand Down
4 changes: 2 additions & 2 deletions test/compile/data/filterinvalid.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ describe('compile/data/filterinvalid', () => {
});
});

it('should add no null filter if when invalid is null', () => {
it('should add no null filter if when invalid is show', () => {
const model = parseUnitModelWithScale(
mergeDeep<TopLevel<NormalizedUnitSpec>>(spec, {
config: {
mark: {invalid: null}
mark: {invalid: 'show'}
}
})
);
Expand Down

0 comments on commit d736c58

Please sign in to comment.