From 2b267ba6e98fa1b0772963cc6a451ac29afc48ba Mon Sep 17 00:00:00 2001 From: DD Date: Tue, 10 Apr 2018 10:38:55 -0400 Subject: [PATCH] Fix tests --- src/containers/paper-canvas.jsx | 1 + src/helper/undo.js | 2 +- test/unit/format-reducer.test.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) 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', () => {