Fix tests

This commit is contained in:
DD 2018-04-10 10:38:55 -04:00
parent 0529c43c25
commit 2b267ba6e9
3 changed files with 4 additions and 3 deletions

View file

@ -254,6 +254,7 @@ class PaperCanvas extends React.Component {
PaperCanvas.propTypes = {
canvasRef: PropTypes.func,
changeFormat: PropTypes.func.isRequired,
clearHoveredItem: PropTypes.func.isRequired,
clearPasteOffset: PropTypes.func.isRequired,
clearSelectedItems: PropTypes.func.isRequired,

View file

@ -9,7 +9,7 @@ import log from '../log/log';
/**
* Take an undo snapshot
* @param {function} dispatchPerformSnapshot Callback to dispatch a state update
* @param {Formats} either bitmap or vector
* @param {Formats} format Either Formats.BITMAP or Formats.VECTOR
*/
const performSnapshot = function (dispatchPerformSnapshot, format) {
const guideLayers = hideGuideLayers();

View file

@ -23,9 +23,9 @@ test('undoRedoChangeFormat', () => {
let reduxState = reducer(defaultState /* state */, changeFormat(Formats.BITMAP) /* action */);
expect(reduxState).toBe(Formats.BITMAP);
reduxState = reducer(reduxState /* state */, undo(Formats.UNDO_BITMAP) /* action */);
expect().toBe(Formats.UNDO_BITMAP);
expect(reduxState).toBe(Formats.UNDO_BITMAP);
reduxState = reducer(reduxState /* state */, redo(Formats.UNDO_VECTOR) /* action */);
expect().toBe(Formats.UNDO_VECTOR);
expect(reduxState).toBe(Formats.UNDO_VECTOR);
});
test('invalidChangeMode', () => {