diff --git a/jest.config.js b/jest.config.js index dc39dba2c0d..d2966df1595 100644 --- a/jest.config.js +++ b/jest.config.js @@ -13,6 +13,7 @@ module.exports = { reporters: [ "default", "jest-junit" ], setupFiles: [ 'jest-localstorage-mock', + 'jest-canvas-mock', '/jest/jest-setup.js' ], testMatch: [ diff --git a/package.json b/package.json index a07b60e8f28..69711148d88 100644 --- a/package.json +++ b/package.json @@ -160,6 +160,7 @@ "istanbul-instrumenter-loader": "^3", "istanbul-merge": "^1.1.1", "jest": "^23", + "jest-canvas-mock": "^1", "jest-junit": "^5", "jest-localstorage-mock": "^2", "json-loader": "^0.5.7", @@ -239,10 +240,8 @@ "jquery": "https://github.com/ryankshaw/jquery.git#a755a3e9c99d5a70d8ea570836f94ae1ba56046d", "canvas-rce/**/babel-helper-evaluate-path": "0.4.1", "canvas-quizzes/grunt-contrib-jasmine/jasmine-core": "2.6.4", - "graphael": "this is just here so yarn.lock looks the same whether the analytics plugin is checked out or not", "graphael": "https://github.com/ryankshaw/graphael.git", "karma": "2.0.2", - "node-sass": "if we let node-sass upgrade to recent versions, it causes: SIS-3125", "node-sass": "4.7.2" } } diff --git a/packages/canvas-planner/jest.config.js b/packages/canvas-planner/jest.config.js index 72ee1edd622..b70124cfe86 100644 --- a/packages/canvas-planner/jest.config.js +++ b/packages/canvas-planner/jest.config.js @@ -25,6 +25,7 @@ module.exports = { 'enzyme-to-json/serializer' ], setupFiles: [ + 'jest-canvas-mock', './jest-env.js' ], testPathIgnorePatterns: [ diff --git a/packages/canvas-planner/package.json b/packages/canvas-planner/package.json index b70eea497c7..96b0b5aba88 100644 --- a/packages/canvas-planner/package.json +++ b/packages/canvas-planner/package.json @@ -103,6 +103,7 @@ "identity-obj-proxy": "^3.0.0", "lint-staged": "^7", "jest": "^23", + "jest-canvas-mock": "^1", "mockdate": "^2.0.2", "moxios": "^0.4.0", "npm-run-all": "^4", diff --git a/yarn.lock b/yarn.lock index 9cc6444ce8e..dd6785b2c3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8734,6 +8734,10 @@ jasmine_xhr@1.0.2: dependencies: sinon "^1.10.3" +jest-canvas-mock@^1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jest-canvas-mock/-/jest-canvas-mock-1.1.0.tgz#f6ed0998b6be3ae2b7e095d7173441ae62cc831e" + jest-changed-files@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.2.0.tgz#a145a6e4b66d0129fc7c99cee134dc937a643d9c"