Tests: Partially fix the tests

This commit is contained in:
Pieter Vander Vennet 2023-05-17 13:16:43 +02:00
parent 3c338696bc
commit f934dad733
8 changed files with 2282 additions and 2221 deletions

View file

@ -1,6 +1,8 @@
import { ChangeDescription } from "../../../Logic/Osm/Actions/ChangeDescription"
import { Changes } from "../../../Logic/Osm/Changes"
import { expect, it } from "vitest"
import {ImmutableStore} from "../../../Logic/UIEventSource";
import {OsmConnection} from "../../../Logic/Osm/OsmConnection";
it("Generate preXML from changeDescriptions", () => {
const changeDescrs: ChangeDescription[] = [
@ -27,7 +29,10 @@ it("Generate preXML from changeDescriptions", () => {
},
},
]
const c = new Changes()
const c = new Changes({
dryRun: new ImmutableStore(true),
osmConnection: new OsmConnection()
})
const descr = c.CreateChangesetObjects(changeDescrs, [])
expect(descr.modifiedObjects).toHaveLength(0)
expect(descr.deletedObjects).toHaveLength(0)