forked from MapComplete/MapComplete
Full code cleanup
This commit is contained in:
parent
8e6ee8c87f
commit
bd21212eba
246 changed files with 19418 additions and 11729 deletions
|
@ -1,26 +1,13 @@
|
|||
import T from "./TestHelper";
|
||||
import {OsmObject} from "../Logic/Osm/OsmObject";
|
||||
import ScriptUtils from "../scripts/ScriptUtils";
|
||||
import {UIEventSource} from "../Logic/UIEventSource";
|
||||
|
||||
export default class OsmObjectSpec extends T {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
constructor() {
|
||||
super("osmobject", [
|
||||
[
|
||||
"Download referencing ways",
|
||||
() => {
|
||||
OsmObjectSpec.runTest().then(_ => console.log("Referencing ways test is done (async)"))
|
||||
OsmObjectSpec.runTest().then(_ => console.log("Referencing ways test is done (async)"))
|
||||
}
|
||||
|
||||
]
|
||||
|
@ -28,4 +15,14 @@ export default class OsmObjectSpec extends T {
|
|||
|
||||
]);
|
||||
}
|
||||
|
||||
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