forked from MapComplete/MapComplete
First steps to a real testing framework: first working version with mocha, chai and doctest-ts
This commit is contained in:
parent
edc366149b
commit
4f4fc650b1
42 changed files with 9032 additions and 9275 deletions
|
|
@ -1,28 +0,0 @@
|
|||
import T from "./TestHelper";
|
||||
import {OsmObject} from "../Logic/Osm/OsmObject";
|
||||
|
||||
export default class OsmObjectSpec extends T {
|
||||
constructor() {
|
||||
super([
|
||||
[
|
||||
"Download referencing ways",
|
||||
() => {
|
||||
OsmObjectSpec.runTest().then(_ => console.log("Referencing ways test is done (async)"))
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
private static async runTest() {
|
||||
const ways = await OsmObject.DownloadReferencingWays("node/1124134958")
|
||||
if (ways === undefined) {
|
||||
throw "Did not get the ways"
|
||||
}
|
||||
if (ways.length !== 4) {
|
||||
throw "Expected 4 ways but got " + ways.length
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue