Skip to content

Commit

Permalink
Test canvas-prebuilt (#5327)
Browse files Browse the repository at this point in the history
* a test

* error in test

* just a notice it has canvas prebuilt

* try remove cache
  • Loading branch information
asturur authored Oct 21, 2018
1 parent 5a57254 commit 40de484
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ env:
global:
- LAUNCHER=Node

matrix:
fast_finish: true

jobs:
fast_finish: true
allow_failures:
Expand Down Expand Up @@ -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"
Expand All @@ -80,10 +93,16 @@ jobs:
env: LAUNCHER=Chrome
install: npm install [email protected] [email protected]
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 [email protected] [email protected]
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

Expand Down
2 changes: 1 addition & 1 deletion test/unit/image_filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');


Expand Down

0 comments on commit 40de484

Please sign in to comment.