Further refactoring of the tests

This commit is contained in:
Pieter Vander Vennet 2022-03-23 19:48:06 +01:00
parent 3ab373f6ec
commit 2dac893bb3
31 changed files with 2498 additions and 2992 deletions

View file

@ -3,6 +3,7 @@ import {main} from "../scripts/generateCache"
import {existsSync, mkdirSync, readFileSync, rmdirSync, unlinkSync} from "fs";
import ScriptUtils from "../scripts/ScriptUtils";
import {Utils} from "../Utils";
import {expect} from "chai";
export default class CreateCacheSpec extends T {
@ -26,8 +27,8 @@ export default class CreateCacheSpec extends T {
])
await ScriptUtils.sleep(100)
const birdhides = JSON.parse(readFileSync("/tmp/np-cache/natuurpunt_birdhide_12_2085_1368.geojson","UTF8"))
T.equals(5, birdhides.features.length, "Got "+birdhides.features.length+" birdhidse")
T.isTrue(birdhides.features.some(f => f.properties.id === "node/5158056232"), "Didn't find birdhide node/5158056232 ")
expect(birdhides.features.length).deep.equal(5)
expect(birdhides.features.some(f => f.properties.id === "node/5158056232"), "Didn't find birdhide node/5158056232 ").true
}
]
]