forked from MapComplete/MapComplete
Various small fixes, add indication of which tags are added for power users
This commit is contained in:
parent
a55767c1e9
commit
47d755e59f
9 changed files with 147 additions and 59 deletions
21
test/TestHelper.ts
Normal file
21
test/TestHelper.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
export default class T {
|
||||
|
||||
constructor(tests: [string, () => void ][]) {
|
||||
let failures : string []= [];
|
||||
for (const [name, test] of tests) {
|
||||
try {
|
||||
test();
|
||||
} catch (e) {
|
||||
failures.push(name);
|
||||
console.warn("Failed test: ", name, "because", e);
|
||||
}
|
||||
}
|
||||
if (failures.length == 0) {
|
||||
console.log("All tests done!")
|
||||
} else {
|
||||
console.warn(failures.length, "tests failedd :(")
|
||||
console.log("Failed tests: ", failures.join(","))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue