0.0.44 • Published 6 months ago
browser-type-tester v0.0.44
Browser Type Tester
too heavy to use it in production, but it's good for testing types in browser
Usage
import { TypeTester } from "browser-type-tester";
const code = `
type Speed = "slow" | "medium" | "fast";
const speed: Speed[] = ["slow"];
function getSpeed(speed: Speed): number {
switch (speed) {
case "slow":
return 10;
case "medium":
return 50;
case "fast":
return 200;
}
}
`;
const typeTest = new TypeTester({ code });
typeTest.test("getSpeed function should return number", () => {
typeTest
.expect("getSpeed")
.toBeType(`(speed: "slow" | "medium" | "fast") => number`);
});
const results = await typeTest.run();
console.log(results);
0.0.44
6 months ago
0.0.42
6 months ago
0.0.41
6 months ago
0.0.40
6 months ago
0.0.39
7 months ago
0.0.38
7 months ago
0.0.37
7 months ago
0.0.36
8 months ago
0.0.35
8 months ago
0.0.34
8 months ago
0.0.33
8 months ago
0.0.32
8 months ago
0.0.31
8 months ago
0.0.30
8 months ago
0.0.29
8 months ago
0.0.28
9 months ago
0.0.27
9 months ago
0.0.26
9 months ago
0.0.25
10 months ago
0.0.24
10 months ago
0.0.23
10 months ago
0.0.22
10 months ago
0.0.21
10 months ago
0.0.20
10 months ago
0.0.19
10 months ago
0.0.18
10 months ago