expect-maptalks
Advanced tools
Comparing version 0.2.5 to 0.3.0
@@ -153,4 +153,11 @@ 'use strict'; | ||
imgData[2] === color[2]); | ||
if (color.length > 3 && expectation) { | ||
expectation = (imgData[3] === color[3]); | ||
} | ||
if (!expectation) { | ||
msg = ', expect color [' + color.join() + '] but actual color is [' + [imgData[0], imgData[1], imgData[2]] + ']'; | ||
var expected = [imgData[0], imgData[1], imgData[2]]; | ||
if (color.length > 3) { | ||
expected.push(imgData[3]); | ||
} | ||
msg = ', expect color [' + color.join() + '] but actual color is [' + expected.join() + ']'; | ||
} else { | ||
@@ -157,0 +164,0 @@ expect = true; |
{ | ||
"name": "expect-maptalks", | ||
"version": "0.2.5", | ||
"version": "0.3.0", | ||
"description": "A plugin of expect.js(https://github.com/Automattic/expect.js) for maptalks with assertions for Coordinate/GeoJSON/Layer", | ||
@@ -10,7 +10,7 @@ "license": "MIT", | ||
}, | ||
"main" : "index.js", | ||
"main": "index.js", | ||
"scripts": { | ||
"lint": "eslint *.js test/**/*.js", | ||
"test": "./node_modules/.bin/mocha", | ||
"pretest" : "npm run lint" | ||
"pretest": "npm run lint" | ||
}, | ||
@@ -17,0 +17,0 @@ "devDependencies": { |
# expect-maptalks | ||
[![Circle CI](https://circleci.com/gh/MapTalks/expect-maptalks.svg?style=shield)](https://circleci.com/gh/MapTalks/expect-maptalks) | ||
[![Circle CI](https://circleci.com/gh/maptalks/expect-maptalks.svg?style=shield)](https://circleci.com/gh/maptalks/expect-maptalks) | ||
@@ -69,2 +69,2 @@ A plugin of expect.js(https://github.com/Automattic/expect.js) for maptalks with assertions for Coordinate/GeoJSON/Layer | ||
expect(v).to.be.painted(5, 3, [255, 255, 255]); | ||
``` | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10888
182
70