diff --git a/src/containers/paper-canvas.jsx b/src/containers/paper-canvas.jsx index 254e730a..7941fa32 100644 --- a/src/containers/paper-canvas.jsx +++ b/src/containers/paper-canvas.jsx @@ -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, diff --git a/src/helper/undo.js b/src/helper/undo.js index f342f245..a069f516 100644 --- a/src/helper/undo.js +++ b/src/helper/undo.js @@ -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(); diff --git a/test/unit/format-reducer.test.js b/test/unit/format-reducer.test.js index 7bcf357f..42527852 100644 --- a/test/unit/format-reducer.test.js +++ b/test/unit/format-reducer.test.js @@ -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', () => {