Chore: fix tests

This commit is contained in:
Pieter Vander Vennet 2024-09-27 03:15:48 +02:00
parent 7212624fad
commit 967f2f1617

View file

@ -69,16 +69,14 @@ export default class DeleteAction extends OsmChangeAction {
* const obj : OsmNode= new OsmNode(1)
* obj.tags = {id:"node/1",name:"Monte Piselli - San Giacomo"}
* const da = new DeleteAction("node/1", new Tag("man_made",""), {theme: "test", specialMotivation: "Testcase"}, true)
* const state = { dryRun: new ImmutableStore(true), osmConnection: new OsmConnection() }
* const descr = await da.CreateChangeDescriptions(new Changes(state), obj)
* const descr = await da.CreateChangeDescriptions(Changes.createTestObject(), obj)
* descr[0] // => {doDelete: true, meta: {theme: "test", specialMotivation: "Testcase",changeType: "deletion"}, type: "node",id: 1 }
*
* // Must not crash if softDeletionTags are undefined
* const da = new DeleteAction("node/1", undefined, {theme: "test", specialMotivation: "Testcase"}, true)
* const obj : OsmNode= new OsmNode(1)
* obj.tags = {id:"node/1",name:"Monte Piselli - San Giacomo"}
* const state = { dryRun: new ImmutableStore(true), osmConnection: new OsmConnection() }
* const descr = await da.CreateChangeDescriptions(new Changes(state), obj)
* const descr = await da.CreateChangeDescriptions(Changes.createTestObject(), obj)
* descr[0] // => {doDelete: true, meta: {theme: "test", specialMotivation: "Testcase", changeType: "deletion"}, type: "node",id: 1 }
*/
public async CreateChangeDescriptions(