zombienet icon indicating copy to clipboard operation
zombienet copied to clipboard

Add support for typescript compilation on the fly for tests

Open wirednkod opened this issue 1 year ago • 1 comments

Following where this appeared in #309 's comment by [@AuroraLantean[(https://github.com/AuroraLantean), we should add TS support for tests.

This could be implemented, based on extension and use tsc to build on the fly

wirednkod avatar Aug 31 '22 11:08 wirednkod

The idea behind it (in order to be also backward compatible) comes down to:

User is able to Program reacts with
a) Add .js extension As it works currently (no removal of `.js`)
b) Add .ts extension Generates .js and runs the test on the .js file - at the end it removes the .js file that was created
c) provides filename without extension Runs (b), if not found runs (a), if non of the two found throws error

This makes it also backward compatible

cc @pepoviola

wirednkod avatar Sep 05 '22 10:09 wirednkod

The idea behind it (in order to be also backward compatible) comes down to:

User is able to Program reacts with a) Add .js extension As it works currently (no removal of .js) b) Add .ts extension Generates .js and runs the test on the .js file - at the end it removes the .js file that was created c) provides filename without extension Runs (b), if not found runs (a), if non of the two found throws error This makes it also backward compatible

cc @pepoviola

Hi @wirednkod, yes. Make sense to me 👍 .

Thanks!

pepoviola avatar Oct 28 '22 14:10 pepoviola