BarGauge: Fix strict null that breaks Storybook build (#22871)

This commit is contained in:
Tobias Skarhed 2020-03-18 18:23:48 +01:00 committed by GitHub
parent bb05989e43
commit 5a5122e7e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,12 +69,12 @@ describe('BarGauge', () => {
describe('Get value color', () => { describe('Get value color', () => {
it('should get the threshold color if value is same as a threshold', () => { it('should get the threshold color if value is same as a threshold', () => {
const props = getProps(); const props = getProps();
props.value = props.display(70); props.value = props.display!(70);
expect(getValueColor(props)).toEqual(orange); expect(getValueColor(props)).toEqual(orange);
}); });
it('should get the base threshold', () => { it('should get the base threshold', () => {
const props = getProps(); const props = getProps();
props.value = props.display(-10); props.value = props.display!(-10);
expect(getValueColor(props)).toEqual(green); expect(getValueColor(props)).toEqual(green);
}); });
}); });