chore: fix failing JS test

This commit is contained in:
Yohan Boniface 2024-01-08 13:31:02 +01:00
parent 08c5d47ee8
commit 0f1e13b994
2 changed files with 4 additions and 2 deletions

View file

@ -216,7 +216,7 @@ describe('L.U.Polygon', function () {
assert.notOk(qst('Transfer shape to edited feature')) 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() this.datalayer.empty()
var layer = new L.U.Polygon( var layer = new L.U.Polygon(
this.map, this.map,
@ -231,7 +231,7 @@ describe('L.U.Polygon', function () {
).addTo(this.datalayer) ).addTo(this.datalayer)
happen.once(other._path, { type: 'contextmenu' }) happen.once(other._path, { type: 'contextmenu' })
assert.equal(qst('Transfer shape to edited feature'), 1) assert.equal(qst('Transfer shape to edited feature'), 1)
done() layer.remove()
}) })
}) })
}) })

View file

@ -175,6 +175,8 @@ describe('L.U.Polyline', function () {
other.edit() other.edit()
happen.once(layer._path, { type: 'contextmenu' }) happen.once(layer._path, { type: 'contextmenu' })
assert.equal(qst('Transfer shape to edited feature'), 1) assert.equal(qst('Transfer shape to edited feature'), 1)
other.remove()
layer.remove()
}) })
it('should allow to merge lines when multi', function () { it('should allow to merge lines when multi', function () {