From 0f1e13b9949f56299981c379d9c71b9ea96fa4ae Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 8 Jan 2024 13:31:02 +0100 Subject: [PATCH] chore: fix failing JS test --- umap/static/umap/test/Polygon.js | 4 ++-- umap/static/umap/test/Polyline.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/umap/static/umap/test/Polygon.js b/umap/static/umap/test/Polygon.js index 9b2070db..3c53d0c3 100644 --- a/umap/static/umap/test/Polygon.js +++ b/umap/static/umap/test/Polygon.js @@ -216,7 +216,7 @@ describe('L.U.Polygon', function () { assert.notOk(qst('Transfer shape to edited feature')) }) - it('should allow to transfer shape when another polygon is edited', function (done) { + it('should allow to transfer shape when another polygon is edited', function () { this.datalayer.empty() var layer = new L.U.Polygon( this.map, @@ -231,7 +231,7 @@ describe('L.U.Polygon', function () { ).addTo(this.datalayer) happen.once(other._path, { type: 'contextmenu' }) assert.equal(qst('Transfer shape to edited feature'), 1) - done() + layer.remove() }) }) }) diff --git a/umap/static/umap/test/Polyline.js b/umap/static/umap/test/Polyline.js index dfc1393c..53a1baf9 100644 --- a/umap/static/umap/test/Polyline.js +++ b/umap/static/umap/test/Polyline.js @@ -175,6 +175,8 @@ describe('L.U.Polyline', function () { other.edit() happen.once(layer._path, { type: 'contextmenu' }) assert.equal(qst('Transfer shape to edited feature'), 1) + other.remove() + layer.remove() }) it('should allow to merge lines when multi', function () {