From 40de484881d5ce55e8db39cc777ef9ddeda50d5a Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Sun, 21 Oct 2018 17:28:44 +0200 Subject: [PATCH] Test canvas-prebuilt (#5327) * a test * error in test * just a notice it has canvas prebuilt * try remove cache --- .travis.yml | 19 +++++++++++++++++++ test/unit/image_filters.js | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d5669b40..12feadd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,9 @@ env: global: - LAUNCHER=Node +matrix: + fast_finish: true + jobs: fast_finish: true allow_failures: @@ -72,6 +75,16 @@ jobs: node_js: "6" - stage: Unit Tests node_js: "4" + - stage: Unit Tests + env: CANVAS=canvas-prebuilt + node_js: "8" + cache: + directories: + - '' + install: npm install && npm remove canvas && npm install canvas-prebuilt@^1.6.11 + addons: + apt: + packages: # avoid installing packages - stage: Visual Tests env: LAUNCHER=Node CANFAIL=TRUE node_js: "8" @@ -80,10 +93,16 @@ jobs: env: LAUNCHER=Chrome install: npm install testem@1.18.4 qunit@2.6.1 script: npm run build:fast && testem ci --port 8080 -f testem-visual.json -l $LAUNCHER + addons: + apt: + packages: # avoid installing packages - stage: Visual Tests env: LAUNCHER=Firefox install: npm install testem@1.18.4 qunit@2.6.1 script: npm run build:fast && testem ci --port 8080 -f testem-visual.json -l $LAUNCHER + addons: + apt: + packages: # avoid installing packages script: npm run build:fast && npm run test diff --git a/test/unit/image_filters.js b/test/unit/image_filters.js index 8869e257..dfa45233 100644 --- a/test/unit/image_filters.js +++ b/test/unit/image_filters.js @@ -13,7 +13,7 @@ var // IMG_SRC = fabric.isLikelyNode ? (__dirname + '/../fixtures/test_image.gif') : getAbsolutePath('../fixtures/test_image.gif'), // IMG_WIDTH = 276, // IMG_HEIGHT = 110, - canvas = fabric.isLikelyNode ? new (require(fabric.canvasModule))() : fabric.document.createElement('canvas'), + canvas = fabric.document.createElement('canvas'), context = canvas.getContext('2d');