I am working on a compiler that generates JavaScript modules and their associated type declarations: it takes one source with a specific grammar and output 3 different files:
Those files export a class with a bunch of methods (that's an example of the type definition that's being generated):
export default class MyClass extends Base {
myApi1(): Promise<void>;
getFoo(): Promise<string>;
// ...
}
All those files are generated by the compiler itself and I am wondering what would good testing strategies to satisfy the following criteria:
More broadly my question is how to test generated files from a compiler/transpiler when those aren't bytecode?