Fix: fix tests with some refactoring

This commit is contained in:
Pieter Vander Vennet 2024-09-27 03:04:05 +02:00
parent f132963485
commit 0b992e75a4
7 changed files with 64 additions and 401 deletions

View file

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