Chore: housekeeping

This commit is contained in:
Pieter Vander Vennet 2024-07-21 12:30:29 +02:00
parent 4add2d1aff
commit adb2aee0f2
4 changed files with 30 additions and 39 deletions

View file

@ -14,15 +14,27 @@ describe("Changes", () => {
const osmConnection = new OsmConnection({ dryRun })
const changes = new Changes({ osmConnection, dryRun })
const id = "node/42"
const tags = new UIEventSource({ id, "amenity": "shop" })
const addImage = new LinkImageAction(id, "image", "https://example.org/uploaded_image", tags, {
theme: "test",
changeType: "add-image",
})
const linkImage = new LinkImageAction(id, "image", "https://example.org/image_to_link", tags, {
theme: "test",
changeType: "link-image",
})
const tags = new UIEventSource({ id, amenity: "shop" })
const addImage = new LinkImageAction(
id,
"image",
"https://example.org/uploaded_image",
tags,
{
theme: "test",
changeType: "add-image",
}
)
const linkImage = new LinkImageAction(
id,
"image",
"https://example.org/image_to_link",
tags,
{
theme: "test",
changeType: "link-image",
}
)
await changes.applyAction(linkImage)
await changes.applyAction(addImage)
@ -40,6 +52,5 @@ describe("Changes", () => {
const change1 = pending[1].tags[0]
expect(change1.k).toBe("image:0")
expect(change1.v).toBe("https://example.org/uploaded_image")
})
})

View file

@ -17,7 +17,7 @@ describe("CreateNoteImportLayer", () => {
}
const layerPrepare = new PrepareLayer(desugaringState)
const layer = layerPrepare.convertStrict(
<any> bookcases,
<any>bookcases,
ConversionContext.test("parse bookcases")
)
const generator = new CreateNoteImportLayer()