Test canvas-prebuilt (#5327)

* a test

* error in test

* just a notice it has canvas prebuilt

* try remove cache
This commit is contained in:
Andrea Bogazzi 2018-10-21 17:28:44 +02:00 committed by GitHub
parent 5a57254df9
commit 40de484881
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View file

@ -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

View file

@ -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');