diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-09-06 23:04:13 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-09-06 23:11:58 -0700 |
commit | d8bd57901e33a7057e26e782e295099ffcc0da89 (patch) | |
tree | e12dfc8cad42b1576756d19d7fbfd82646a009bf /webapp/tests/utils/utils_get_nearest_point.test.jsx | |
parent | 7bc8e9a08dfde56387f946fdf5086252aa4d0491 (diff) | |
download | chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.gz chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.bz2 chat-d8bd57901e33a7057e26e782e295099ffcc0da89.zip |
Removing webapp
Diffstat (limited to 'webapp/tests/utils/utils_get_nearest_point.test.jsx')
-rw-r--r-- | webapp/tests/utils/utils_get_nearest_point.test.jsx | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/webapp/tests/utils/utils_get_nearest_point.test.jsx b/webapp/tests/utils/utils_get_nearest_point.test.jsx deleted file mode 100644 index 101f768bb..000000000 --- a/webapp/tests/utils/utils_get_nearest_point.test.jsx +++ /dev/null @@ -1,31 +0,0 @@ -import * as CommonUtils from 'utils/commons.jsx'; - -describe('CommonUtils.getNearestPoint', function() { - test('should return nearest point', function() { - for (const data of [ - { - points: [{x: 30, y: 40}, {x: 50, y: 50}, {x: 100, y: 2}, {x: 500, y: 200}, {x: 110, y: 20}, {x: 10, y: 20}], - pivotPoint: {x: 10, y: 20}, - nearestPoint: {x: 10, y: 20}, - nearestPointLte: {x: 10, y: 20} - }, - { - points: [{x: 50, y: 50}, {x: 100, y: 2}, {x: 500, y: 200}, {x: 110, y: 20}, {x: 100, y: 90}, {x: 30, y: 40}], - pivotPoint: {x: 10, y: 20}, - nearestPoint: {x: 30, y: 40}, - nearestPointLte: {} - }, - { - points: [{x: 50, y: 50}, {x: 1, y: 1}, {x: 15, y: 25}, {x: 100, y: 2}, {x: 500, y: 200}, {x: 110, y: 20}], - pivotPoint: {x: 10, y: 20}, - nearestPoint: {x: 15, y: 25}, - nearestPointLte: {x: 1, y: 1} - } - ]) { - const nearestPoint = CommonUtils.getNearestPoint(data.pivotPoint, data.points); - - expect(nearestPoint.x).toEqual(data.nearestPoint.x); - expect(nearestPoint.y).toEqual(data.nearestPoint.y); - } - }); -}); |