forked from MapComplete/MapComplete
Reformat all files with prettier
This commit is contained in:
parent
e22d189376
commit
b541d3eab4
382 changed files with 50893 additions and 35566 deletions
|
@ -1,6 +1,6 @@
|
|||
import {expect} from 'chai'
|
||||
import {ChangeDescription} from "../../../Logic/Osm/Actions/ChangeDescription";
|
||||
import {Changes} from "../../../Logic/Osm/Changes";
|
||||
import { expect } from "chai"
|
||||
import { ChangeDescription } from "../../../Logic/Osm/Actions/ChangeDescription"
|
||||
import { Changes } from "../../../Logic/Osm/Changes"
|
||||
|
||||
it("Generate preXML from changeDescriptions", () => {
|
||||
const changeDescrs: ChangeDescription[] = [
|
||||
|
@ -9,29 +9,26 @@ it("Generate preXML from changeDescriptions", () => {
|
|||
id: -1,
|
||||
changes: {
|
||||
lat: 42,
|
||||
lon: -8
|
||||
lon: -8,
|
||||
},
|
||||
tags: [{k: "someKey", v: "someValue"}],
|
||||
tags: [{ k: "someKey", v: "someValue" }],
|
||||
meta: {
|
||||
changeType: "create",
|
||||
theme: "test"
|
||||
}
|
||||
theme: "test",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "node",
|
||||
id: -1,
|
||||
tags: [{k: 'foo', v: 'bar'}],
|
||||
tags: [{ k: "foo", v: "bar" }],
|
||||
meta: {
|
||||
changeType: "answer",
|
||||
theme: "test"
|
||||
}
|
||||
}
|
||||
theme: "test",
|
||||
},
|
||||
},
|
||||
]
|
||||
const c = new Changes()
|
||||
const descr = c.CreateChangesetObjects(
|
||||
changeDescrs,
|
||||
[]
|
||||
)
|
||||
const descr = c.CreateChangesetObjects(changeDescrs, [])
|
||||
expect(descr.modifiedObjects).length(0)
|
||||
expect(descr.deletedObjects).length(0)
|
||||
expect(descr.newObjects).length(1)
|
||||
|
@ -39,4 +36,4 @@ it("Generate preXML from changeDescriptions", () => {
|
|||
const ch = descr.newObjects[0]
|
||||
expect(ch.tags["foo"]).eq("bar")
|
||||
expect(ch.tags["someKey"]).eq("someValue")
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue