forked from MapComplete/MapComplete
Fix tests
This commit is contained in:
parent
b6a512961d
commit
33e9a94199
1 changed files with 4 additions and 4 deletions
|
@ -2683,7 +2683,7 @@ describe("SplitAction", () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
it("split 295132739", async () => {
|
it("split 295132739", async () => {
|
||||||
// Lets split road https://www.openstreetmap.org/way/295132739
|
// Let's split road https://www.openstreetmap.org/way/295132739
|
||||||
const id = "way/295132739"
|
const id = "way/295132739"
|
||||||
const splitPoint: [number, number] = [3.246733546257019, 51.181710380278176]
|
const splitPoint: [number, number] = [3.246733546257019, 51.181710380278176]
|
||||||
const splitter = new SplitAction(id, [splitPoint], {
|
const splitter = new SplitAction(id, [splitPoint], {
|
||||||
|
@ -2697,11 +2697,11 @@ describe("SplitAction", () => {
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(changeDescription[0].type).toBe("node")
|
expect(changeDescription[0].type).toBe("node")
|
||||||
expect(changeDescription[0].id).toBe(-1)
|
expect(changeDescription[0].id).toBe(-2)
|
||||||
expect(changeDescription[0].changes["lat"]).toBe(51.181710380278176)
|
expect(changeDescription[0].changes["lat"]).toBe(51.181710380278176)
|
||||||
expect(changeDescription[0].changes["lon"]).toBe(3.246733546257019)
|
expect(changeDescription[0].changes["lon"]).toBe(3.246733546257019)
|
||||||
expect(changeDescription[1].type).toBe("way")
|
expect(changeDescription[1].type).toBe("way")
|
||||||
expect(changeDescription[1].id).toBe(-2)
|
expect(changeDescription[1].id).toBe(-3)
|
||||||
expect(changeDescription[1].changes["coordinates"].length).toBe(6)
|
expect(changeDescription[1].changes["coordinates"].length).toBe(6)
|
||||||
expect(changeDescription[1].changes["coordinates"][5][0]).toBe(splitPoint[0])
|
expect(changeDescription[1].changes["coordinates"][5][0]).toBe(splitPoint[0])
|
||||||
expect(changeDescription[1].changes["coordinates"][5][1]).toBe(splitPoint[1])
|
expect(changeDescription[1].changes["coordinates"][5][1]).toBe(splitPoint[1])
|
||||||
|
@ -2811,7 +2811,7 @@ describe("SplitAction", () => {
|
||||||
|
|
||||||
// THe first change is the creation of the new node
|
// THe first change is the creation of the new node
|
||||||
expect(changes[0].type).toEqual("node")
|
expect(changes[0].type).toEqual("node")
|
||||||
expect(changes[0].id).toEqual(-1)
|
expect(changes[0].id).toEqual(-2)
|
||||||
|
|
||||||
expect(changes[1].changes["nodes"]).toEqual([
|
expect(changes[1].changes["nodes"]).toEqual([
|
||||||
6490126559, 8715440375, 8715440374, 8715440373, 8715440372, 8715440371, 8715440370,
|
6490126559, 8715440375, 8715440374, 8715440373, 8715440372, 8715440371, 8715440370,
|
||||||
|
|
Loading…
Reference in a new issue