Add proper unittests

This commit is contained in:
Lucas Verney 2018-11-29 14:13:58 +01:00
parent 82e414a63d
commit 2c741cfb5c
7 changed files with 269 additions and 135 deletions

View File

@ -1,4 +1,12 @@
{
"env": {
"test": {
"presets": [
"@babel/preset-env"
],
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
},
"presets": [
[
"@babel/preset-env",

View File

@ -1,4 +1,5 @@
/build/
/config/
/dist/
/src/**/*.spec.js
/*.js

View File

@ -86,6 +86,11 @@ command might be useful to help you determine which components are used across
the code.
### Unittests
Unittests are written in `.spec.js` files placed next to the tested JS module.
## Translating
Translation is done directly on [Zanata](https://translate.zanata.org/iteration/view/cyclassist/master?dswid=7345).

View File

@ -11,7 +11,8 @@
"build": "rm -r dist/*; webpack-cli --bail --progress --config build/webpack.prod.conf.js",
"push-locales": "json2po -P -i src/i18n/en.json -t src/i18n/en.json -o po/cyclassist.pot && zanata push",
"pull-locales": "zanata pull && ./.po2json.sh",
"list-vuetify-components": "ack '<v-' src | sed -e 's/^src\\/.*:[[:space:]]*<//' | grep '^v-' | sed -e 's/\\(v-[^[:space:]>]*\\).*/\\1/' | sort | uniq"
"list-vuetify-components": "ack '<v-' src | sed -e 's/^src\\/.*:[[:space:]]*<//' | grep '^v-' | sed -e 's/\\(v-[^[:space:]>]*\\).*/\\1/' | sort | uniq",
"test": "BABEL_ENV=test ./node_modules/.bin/mocha --require @babel/polyfill --require @babel/register ./src/**/*.spec.js"
},
"dependencies": {
"@babel/polyfill": "^7.0.0",
@ -32,7 +33,9 @@
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-modules-commonjs": "^7.1.0",
"@babel/preset-env": "^7.1.6",
"@babel/register": "^7.0.0",
"app-manifest-webpack-plugin": "^1.1.3",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.4",
@ -49,6 +52,7 @@
"html-webpack-plugin": "^3.2.0",
"image-webpack-loader": "^4.5.0",
"mini-css-extract-plugin": "^0.4.5",
"mocha": "^5.2.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"portfinder": "^1.0.19",
"postcss-loader": "^3.0.0",

View File

@ -13,25 +13,12 @@
* @note This is used with latitude and longitude in mind,
* hence the names, but is much more generic and can
* be used with any (X, Y) coordinates.
*
* Examples:
* @code
* const ring = [[0, 0], [0, 1], [1, 1], [0.5, 0.5], [1, 0], [0, 0]];
* isInRing([0, 0], ring, false) === true
* isInRing([0, 0], ring, true) === false
* isInRing([0.25, 0.25], ring, false) === true
* isInRing([0.25, 0.25], ring, true) === true
* isInRing([0.8, 0.6], ring, true) === false
* isInRing([0.8, 0.6], ring, false) === false
* isInRing([2, 2], ring, false) === false
* isInRing([2, 2], ring, true) === false
* @endcode
*/
export function isInRing(latLng, ring, ignoreBoundary) {
let isInside = false;
// If the ring is a full loop, ignore the duplicate point
let openRing = Array.concat([], ring);
let openRing = [].concat(ring);
if (
openRing[0][0] === openRing[openRing.length - 1][0]
&& openRing[0][1] === openRing[openRing.length - 1][1]
@ -80,15 +67,6 @@ export function isInRing(latLng, ring, ignoreBoundary) {
* @note This is used with latitude and longitude in mind, hence the
* names, but is much more generic and can be used with any
* (X, Y) coordinates.
*
* Examples:
* @code
* isInBBox([0.5, 0.5], [0, 0, 1, 1]) === true
* isInBBox([0, 1], [0, 0, 1, 1]) === true
* isInBBox([1, 0], [0, 0, 1, 1]) === true
* isInBBox([2, 0], [0, 0, 1, 1]) === false
* isInBBox([0, 2], [0, 0, 1, 1]) === false
* @endcode
*/
export function isInBBox(latLng, bbox) {
return (
@ -112,11 +90,6 @@ export function isInBBox(latLng, bbox) {
* names, but is much more generic and can be used with any
* (X, Y) coordinates.
* @note This works with a polygon or polyline.
*
* Examples:
* @code
* computeBBox([[0, 0], [1, 0], [1, 1], [0, 1]]) === [0, 0, 1, 1]
* @endcode
*/
export function computeBBox(polygon) {
const latList = polygon.map(item => item[0]);
@ -145,19 +118,6 @@ export function computeBBox(polygon) {
* @note This is used with latitude and longitude in mind,
* hence the names, but is much more generic and can
* be used with any (X, Y) coordinates.
*
* Examples:
* @code
* const ring = [[0, 0], [0, 1], [1, 1], [0.5, 0.5], [1, 0], [0, 0]];
* isWithinPolygon([0, 0], ring, false) === true
* isWithinPolygon([0, 0], ring, true) === false
* isWithinPolygon([0.25, 0.25], ring, false) === true
* isWithinPolygon([0.25, 0.25], ring, true) === true
* isWithinPolygon([0.8, 0.6], ring, true) === false
* isWithinPolygon([0.8, 0.6], ring, false) === false
* isWithinPolygon([2, 2], ring, false) === false
* isWithinPolygon([2, 2], ring, true) === false
* @endcode
*/
export function isWithinPolygon(latLng, polygon, ignoreBoundary) {
const shouldIgnoreBoundary = ignoreBoundary || false;
@ -175,7 +135,6 @@ export function isWithinPolygon(latLng, polygon, ignoreBoundary) {
}
/* eslint-disable max-len */
/**
* Cheap distance computation between two points based on
* https://blog.mapbox.com/fast-geodesic-approximations-with-cheap-ruler-106f229ad016.
@ -184,18 +143,7 @@ export function isWithinPolygon(latLng, polygon, ignoreBoundary) {
* @param latLng1 A [latitude, longitude] array for the first point.
* @param latLng2 A [latitude, longitude] array for the second point.
* @return The distance in meters.
*
* Examples
* @code
* // Vincenty's formula gives 5177.692 meters
* Math.abs(pointToPointDistance([48.8171, 2.3186], [48.8454, 2.3746]) - 5177.692) / pointToPointDistance([48.8171, 2.3186], [48.8454, 2.3746]) < 1 / 100
* // Vincenty's formula gives 7720.121 meters
* Math.abs(pointToPointDistance([50.6314, 3.0027], [50.6271, 3.1116]) - 7720.121) / pointToPointDistance([50.6314, 3.0027], [50.6271, 3.1116]) < 1 / 100
* // Vincenty's formula gives 10443.762 meters
* Math.abs(pointToPointDistance([42.6722, 2.8508], [42.7093, 2.9679]) - 10443.762) / pointToPointDistance([42.6722, 2.8508], [42.7093, 2.9679]) < 1 / 100
* @endcode
*/
/* eslint-enable max-len */
export function pointToPointDistance(latLng1, latLng2) {
const cos = Math.cos((latLng1[0] + latLng2[0]) / 2 * Math.PI / 180);
const cos2 = 2 * cos * cos - 1;
@ -221,20 +169,12 @@ export function pointToPointDistance(latLng1, latLng2) {
* @param u Array of coordinates of the first vector.
* @param v Array of coordinates of the second vector.
* @return The dot product of the two vectors.
*
* Examples:
* @code
* Math.abs(dot([1, 0], [0, 0]) - 0) < Number.EPSILON
* Math.abs(dot([1, 0], [1, 0]) - 1) < Number.EPSILON
* Math.abs(dot([1, 1], [1, 2]) - 3) < Number.EPSILON
* @endcode
*/
export function dot(u, v) {
return (u[0] * v[0] + u[1] * v[1]);
}
/* eslint-disable max-len */
/**
* Compute the distance between a point and a polyLine.
* Adapted from https://github.com/Turfjs/turf/, licensed under MIT.
@ -244,26 +184,7 @@ export function dot(u, v) {
* @param polyLine A list of [latitude, longitude] arrays for each vertex
* of the polyLine.
* @return The distance between the point and the polyLine.
*
* Examples:
* @code
* const polyLine = [[48.8105, 2.3088], [48.8098, 2.3218]];
*
* // Any point at the end
* Math.abs(pointToLineDistance([48.8105, 2.3088], polyLine) - 0) < Number.EPSILON
* Math.abs(pointToLineDistance([48.8098, 2.3218], polyLine) - 0) < Number.EPSILON
*
* // Points in misc positions
* Math.abs(pointToLineDistance([48.8170, 2.3188], polyLine) - 780) / 780 < 1 / 100
* Math.abs(pointToLineDistance([48.8121, 2.3074], polyLine) - 205) / 205 < 1 / 100
* Math.abs(pointToLineDistance([48.8089, 2.3315], polyLine) - 720) / 720 < 5 / 100
*
* // Longer polyLine
* Math.abs(pointToLineDistance([48.8098, 2.3218], [[48.8105, 2.3088], [48.8098, 2.3218], [48.8089, 2.3315]]) - 0) < Number.EPSILON
* Math.abs(pointToLineDistance([48.82787, 2.32686], [[48.809982, 2.3190774], [48.8176872, 2.3320935], [48.8182127, 2.3323712], [48.8222148, 2.3143633], [48.8222632, 2.314133], [48.8115136, 2.3002323], [48.8113242, 2.3000166], [48.809982, 2.3190774]]) - 900) / 900 < 1 / 100
* @endcode
*/
/* eslint-enable max-len */
export function pointToLineDistance(latLng, polyLine) {
let distance = Number.POSITIVE_INFINITY;
@ -305,7 +226,6 @@ export function pointToLineDistance(latLng, polyLine) {
}
/* eslint-disable max-len */
/**
* Compute the distance between a point and a polygon.
*
@ -313,20 +233,7 @@ export function pointToLineDistance(latLng, polyLine) {
* @param polygon A list of [latitude, longitude] arrays of the vertices of
* the polygon.
* @return The distance between the point and the polygon.
*
* Examples:
* @code
* const polygon = [[48.809982, 2.3190774], [48.8176872, 2.3320935], [48.8182127, 2.3323712], [48.8222148, 2.3143633], [48.8222632, 2.314133], [48.8115136, 2.3002323], [48.8113242, 2.3000166], [48.809982, 2.3190774]];
*
* // Point on the ring
* Math.abs(pointToPolygonDistance([48.809982, 2.3190774], polygon) - 0) < Number.EPSILON
* // Point in the inside
* Math.abs(pointToPolygonDistance([48.8161, 2.3169], polygon) - 0) < Number.EPSILON
* // Point outside of the ring
* Math.abs(pointToPolygonDistance([48.82787, 2.32686], polygon) - 900) / 900 < 1 / 100
* @endcode
*/
/* eslint-enable max-len */
export function pointToPolygonDistance(latLng, polygon) {
const polygonRing = polygon;
// Ensure the polygon ring is a full loop
@ -347,7 +254,6 @@ export function pointToPolygonDistance(latLng, polygon) {
}
/* eslint-disable max-len */
/**
* Compute the distance between a point and a GeoJSON geometry.
*
@ -356,25 +262,9 @@ export function pointToPolygonDistance(latLng, polygon) {
* "coordinates" keys). Coordinates are GeoJSON-like,
* longitude first and latitude then.
* @return The distance between the point and the geometry.
*
* Examples:
* @code
* const point = { type: 'Point', coordinates: [2.3746, 48.8454] }
* Math.abs(pointToGeometryDistance([48.8171, 2.3186], point) - 5177.692) / 5177.692 < 1 / 100
*
* const lineString = { type: 'LineString', coordinates: [[2.3088, 48.8105], [2.3218, 48.8098]] }
* Math.abs(pointToGeometryDistance([48.8170, 2.3188], lineString) - 780) / 780 < 1 / 100
*
* const polygon = { type: 'Polygon', coordinates: [[2.3190774, 48.809982], [2.3320935, 48.8176872], [2.3323712, 48.8182127], [2.3143633, 48.8222148], [2.314133, 48.8222632], [2.3002323, 48.8115136], [2.3000166, 48.8113242], [2.3190774, 48.809982]] }
* Math.abs(pointToGeometryDistance([48.82787, 2.32686], polygon) - 900) / 900 < 1 / 100
*
* const unknownGeometry = { type: 'Foobar', coordinates: [48.8454, 2.3746] }
* pointToGeometryDistance([48.82787, 2.32686], unknownGeometry) === null
* @endcode
*/
/* eslint-enable max-len */
export function pointToGeometryDistance(latLng, geometry) {
const lngLatCoordinates = Array.concat([], geometry.coordinates);
const lngLatCoordinates = [].concat(geometry.coordinates);
if (geometry.type === 'Point') {
return pointToPointDistance(latLng, lngLatCoordinates.reverse());

164
src/tools/geometry.spec.js Normal file
View File

@ -0,0 +1,164 @@
var assert = require('assert');
var geometry = require('./geometry');
describe('Geometry tools', function() {
describe('isInRing', function () {
var ring = [[0, 0], [0, 1], [1, 1], [0.5, 0.5], [1, 0], [0, 0]];
it('should return true for a point in the ring', function () {
assert(geometry.isInRing([0, 0], ring, false) === true);
assert(geometry.isInRing([0.25, 0.25], ring, false)) === true;
assert(geometry.isInRing([0.25, 0.25], ring, true) === true);
});
it('should return false for a point outside of the ring', function () {
assert(geometry.isInRing([0, 0], ring, true) === false);
assert(geometry.isInRing([0.8, 0.6], ring, true) === false);
assert(geometry.isInRing([0.8, 0.6], ring, false) === false);
assert(geometry.isInRing([2, 2], ring, false) === false);
assert(geometry.isInRing([2, 2], ring, true) === false);
})
});
describe('isInBBox', function () {
it('should return true for a point inside the bbox', function () {
assert(geometry.isInBBox([0.5, 0.5], [0, 0, 1, 1]) == true);
assert(geometry.isInBBox([0, 1], [0, 0, 1, 1]) === true);
assert(geometry.isInBBox([1, 0], [0, 0, 1, 1]) === true);
});
it('should return false for a point outside of the bbox', function () {
assert(geometry.isInBBox([2, 0], [0, 0, 1, 1]) === false);
assert(geometry.isInBBox([0, 2], [0, 0, 1, 1]) === false);
});
});
describe('computeBBox', function () {
it('should return correct BBox', function () {
assert.deepEqual(geometry.computeBBox([[0, 0], [1, 0], [1, 1], [0, 1]]), [0, 0, 1, 1]);
});
});
describe('isWithinPolygon', function () {
var ring = [[0, 0], [0, 1], [1, 1], [0.5, 0.5], [1, 0], [0, 0]];
it('should return true for points inside the polygon', function () {
assert(geometry.isWithinPolygon([0, 0], ring, false) === true);
assert(geometry.isWithinPolygon([0.25, 0.25], ring, false) === true);
assert(geometry.isWithinPolygon([0.25, 0.25], ring, true) === true);
});
it('should return false for points outside the polygon', function () {
assert(geometry.isWithinPolygon([0, 0], ring, true) === false);
assert(geometry.isWithinPolygon([0.8, 0.6], ring, true) === false);
assert(geometry.isWithinPolygon([0.8, 0.6], ring, false) === false);
assert(geometry.isWithinPolygon([2, 2], ring, false) === false);
assert(geometry.isWithinPolygon([2, 2], ring, true) === false);
});
});
describe('pointToPointDistance', function () {
it('should return results close to Vincenty\'s formula', function () {
assert(
(Math.abs(
geometry.pointToPointDistance([48.8171, 2.3186], [48.8454, 2.3746])
- 5177.692 // Vincenty's formula result
) / 5177.692)
< 1 / 100
);
assert(
(Math.abs(
geometry.pointToPointDistance([50.6314, 3.0027], [50.6271, 3.1116])
- 7720.121 // Vincenty's formula result
) / 7720.121)
< 1 / 100
);
assert(
(Math.abs(
geometry.pointToPointDistance([42.6722, 2.8508], [42.7093, 2.9679])
- 10443.762 // Vincenty's formula result
) / 10443.762)
< 1 / 100
);
});
});
describe('dot', function () {
it('should return the correct dot product', function () {
assert(Math.abs(geometry.dot([1, 0], [0, 0]) - 0) < Number.EPSILON);
assert(Math.abs(geometry.dot([1, 0], [1, 0]) - 1) < Number.EPSILON);
assert(Math.abs(geometry.dot([1, 1], [1, 2]) - 3) < Number.EPSILON);
})
});
describe('pointToLineDistance', function () {
var polyLine = [[48.8105, 2.3088], [48.8098, 2.3218]];
it('should return the correct distance for a point at the end', function () {
assert(Math.abs(geometry.pointToLineDistance([48.8105, 2.3088], polyLine) - 0) < Number.EPSILON);
assert(Math.abs(geometry.pointToLineDistance([48.8098, 2.3218], polyLine) - 0) < Number.EPSILON);
});
it('should return the correct distance for any point', function () {
assert(Math.abs(geometry.pointToLineDistance([48.8170, 2.3188], polyLine) - 780) / 780 < 1 / 100);
assert(Math.abs(geometry.pointToLineDistance([48.8121, 2.3074], polyLine) - 205) / 205 < 1 / 100);
assert(Math.abs(geometry.pointToLineDistance([48.8089, 2.3315], polyLine) - 720) / 720 < 5 / 100);
});
it('should return the correct distance for longer lines', function () {
assert(
Math.abs(
geometry.pointToLineDistance(
[48.8098, 2.3218],
[[48.8105, 2.3088], [48.8098, 2.3218], [48.8089, 2.3315]]
) - 0
) < Number.EPSILON
);
assert(
(Math.abs(
geometry.pointToLineDistance(
[48.82787, 2.32686],
[[48.809982, 2.3190774], [48.8176872, 2.3320935], [48.8182127, 2.3323712], [48.8222148, 2.3143633], [48.8222632, 2.314133], [48.8115136, 2.3002323], [48.8113242, 2.3000166], [48.809982, 2.3190774]]
) - 900
) / 900)
< 1 / 100);
});
});
describe('pointToPolygonDistance', function () {
var polygon = [[48.809982, 2.3190774], [48.8176872, 2.3320935], [48.8182127, 2.3323712], [48.8222148, 2.3143633], [48.8222632, 2.314133], [48.8115136, 2.3002323], [48.8113242, 2.3000166], [48.809982, 2.3190774]];
it('should return correct distance for a point on the ring', function () {
assert(Math.abs(geometry.pointToPolygonDistance([48.809982, 2.3190774], polygon) - 0) < Number.EPSILON);
});
it('should return correct distance for a point in the inside', function () {
assert(Math.abs(geometry.pointToPolygonDistance([48.8161, 2.3169], polygon) - 0) < Number.EPSILON);
});
it('should return correct distance for a point outside', function () {
assert(Math.abs(geometry.pointToPolygonDistance([48.82787, 2.32686], polygon) - 900) / 900 < 1 / 100);
});
});
describe('pointToGeometryDistance', function () {
it('should return correct distance for a point', function () {
var point = { type: 'Point', coordinates: [2.3746, 48.8454] };
assert(Math.abs(geometry.pointToGeometryDistance([48.8171, 2.3186], point) - 5177.692) / 5177.692 < 1 / 100);
});
it('should return correct distance for a line', function () {
var lineString = { type: 'LineString', coordinates: [[2.3088, 48.8105], [2.3218, 48.8098]] };
assert(Math.abs(geometry.pointToGeometryDistance([48.8170, 2.3188], lineString) - 780) / 780 < 1 / 100);
});
it('should return correct distance for a polygon', function () {
var polygon = { type: 'Polygon', coordinates: [[2.3190774, 48.809982], [2.3320935, 48.8176872], [2.3323712, 48.8182127], [2.3143633, 48.8222148], [2.314133, 48.8222632], [2.3002323, 48.8115136], [2.3000166, 48.8113242], [2.3190774, 48.809982]] };
assert(Math.abs(geometry.pointToGeometryDistance([48.82787, 2.32686], polygon) - 900) / 900 < 1 / 100);
});
it('should return null for an unknown geometry', function () {
var unknownGeometry = { type: 'Foobar', coordinates: [48.8454, 2.3746] };
assert(geometry.pointToGeometryDistance([48.82787, 2.32686], unknownGeometry) === null);
});
});
});

106
yarn.lock
View File

@ -572,6 +572,19 @@
js-levenshtein "^1.1.3"
semver "^5.3.0"
"@babel/register@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0.tgz#fa634bae1bfa429f60615b754fc1f1d745edd827"
integrity sha512-f/+CRmaCe7rVEvcvPvxeA8j5aJhHC3aJie7YuqcMDhUOuyWLA7J/aNrTaHIzoWPEhpHA54mec4Mm8fv8KBlv3g==
dependencies:
core-js "^2.5.7"
find-cache-dir "^1.0.0"
home-or-tmp "^3.0.0"
lodash "^4.17.10"
mkdirp "^0.5.1"
pirates "^4.0.0"
source-map-support "^0.5.9"
"@babel/template@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0.tgz#c2bc9870405959c89a9c814376a2ecb247838c80"
@ -1438,6 +1451,11 @@ brorand@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
browser-stdout@1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==
browserify-aes@^1.0.0, browserify-aes@^1.0.4:
version "1.2.0"
resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48"
@ -1966,7 +1984,7 @@ combined-stream@1.0.6, combined-stream@~1.0.5:
dependencies:
delayed-stream "~1.0.0"
commander@2.15.x, commander@~2.15.0:
commander@2.15.1, commander@2.15.x, commander@~2.15.0:
version "2.15.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
@ -2460,7 +2478,7 @@ de-indent@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
debug@*, debug@^3.1.0:
debug@*, debug@3.1.0, debug@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
dependencies:
@ -2718,6 +2736,11 @@ detect-node@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127"
diff@3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==
diffie-hellman@^5.0.0:
version "5.0.3"
resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
@ -3052,7 +3075,7 @@ escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
@ -4040,17 +4063,7 @@ glob@7.0.x:
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^5.0.3:
version "5.0.15"
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
dependencies:
inflight "^1.0.4"
inherits "2"
minimatch "2 || 3"
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^7.0.3, glob@^7.0.5, glob@^7.1.2:
glob@7.1.2, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2:
version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
dependencies:
@ -4061,6 +4074,16 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.2:
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^5.0.3:
version "5.0.15"
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
dependencies:
inflight "^1.0.4"
inherits "2"
minimatch "2 || 3"
once "^1.3.0"
path-is-absolute "^1.0.0"
global-modules-path@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/global-modules-path/-/global-modules-path-2.3.0.tgz#b0e2bac6beac39745f7db5c59d26a36a0b94f7dc"
@ -4192,6 +4215,11 @@ graceful-fs@^4.0.0, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2
version "1.0.1"
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
growl@1.10.5:
version "1.10.5"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==
gulp-decompress@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/gulp-decompress/-/gulp-decompress-1.2.0.tgz#8eeb65a5e015f8ed8532cafe28454960626f0dc7"
@ -4359,7 +4387,7 @@ hasha@^2.2.0:
is-stream "^1.0.1"
pinkie-promise "^2.0.0"
he@1.1.x, he@^1.1.0:
he@1.1.1, he@1.1.x, he@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
@ -4375,6 +4403,11 @@ hmac-drbg@^1.0.0:
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.1"
home-or-tmp@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-3.0.0.tgz#57a8fe24cf33cdd524860a15821ddc25c86671fb"
integrity sha1-V6j+JM8zzdUkhgoVgh3cJchmcfs=
hoopy@^0.1.2:
version "0.1.4"
resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d"
@ -5853,7 +5886,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4:
"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
@ -5924,6 +5957,23 @@ mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@
dependencies:
minimist "0.0.8"
mocha@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6"
integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==
dependencies:
browser-stdout "1.3.1"
commander "2.15.1"
debug "3.1.0"
diff "3.5.0"
escape-string-regexp "1.0.5"
glob "7.1.2"
growl "1.10.5"
he "1.1.1"
minimatch "3.0.4"
mkdirp "0.5.1"
supports-color "5.4.0"
move-concurrently@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
@ -6057,6 +6107,11 @@ node-forge@0.7.5:
util "^0.10.3"
vm-browserify "0.0.4"
node-modules-regexp@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40"
integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=
node-pre-gyp@^0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz#6e4ef5bb5c5203c6552448828c852c40111aac46"
@ -6723,6 +6778,13 @@ pinkie@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
pirates@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.0.tgz#850b18781b4ac6ec58a43c9ed9ec5fe6796addbd"
integrity sha512-8t5BsXy1LUIjn3WWOlOuFDuKswhQb/tkak641lvBgmPOBUQHXveORtlMCp6OdPV1dtuTaEahKA8VNz6uLfKBtA==
dependencies:
node-modules-regexp "^1.0.0"
pixelmatch@^4.0.0:
version "4.0.2"
resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-4.0.2.tgz#8f47dcec5011b477b67db03c243bc1f3085e8854"
@ -8312,7 +8374,7 @@ source-map-resolve@^0.5.0:
source-map-url "^0.4.0"
urix "^0.1.0"
source-map-support@~0.5.6:
source-map-support@^0.5.9, source-map-support@~0.5.6:
version "0.5.9"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==
@ -8634,16 +8696,16 @@ sum-up@^1.0.1:
dependencies:
chalk "^1.0.0"
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
supports-color@^5.1.0, supports-color@^5.3.0, supports-color@^5.4.0:
supports-color@5.4.0, supports-color@^5.1.0, supports-color@^5.3.0, supports-color@^5.4.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
dependencies:
has-flag "^3.0.0"
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
supports-color@^5.5.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"