mirror of
https://github.com/apache/superset.git
synced 2026-04-09 03:16:07 +00:00
* [lint] turn no-undef back on, set browser, cypress, and mocha env's, and fix issues * [lint] fix undefined var in TimeTable.jsx
19 lines
800 B
JavaScript
19 lines
800 B
JavaScript
/* eslint-disable no-unused-expressions */
|
|
import { expect } from 'chai';
|
|
import { defaultState } from '../../../src/explore/store';
|
|
import exploreReducer from '../../../src/explore/reducers/exploreReducer';
|
|
import * as actions from '../../../src/explore/actions/exploreActions';
|
|
|
|
describe('reducers', () => {
|
|
it('sets correct control value given a key and value', () => {
|
|
const newState = exploreReducer(
|
|
defaultState, actions.setControlValue('x_axis_label', 'x', []));
|
|
expect(newState.controls.x_axis_label.value).to.equal('x');
|
|
});
|
|
it('setControlValue works as expected with a checkbox', () => {
|
|
const newState = exploreReducer(defaultState,
|
|
actions.setControlValue('show_legend', true, []));
|
|
expect(newState.controls.show_legend.value).to.equal(true);
|
|
});
|
|
});
|