askql icon indicating copy to clipboard operation
askql copied to clipboard

Should we use AskScript for test args .args.ts and expected result .result.ts

Open mhagmajer opened this issue 4 years ago • 4 comments

Following discussion in #293, how about we use AskScript to define individual test arguments and results?

mhagmajer avatar Jul 01 '20 13:07 mhagmajer

What would be the gain of rewriting all TypeScript to AskScript for args and results?

czerwinskilukasz1 avatar Jul 03 '20 14:07 czerwinskilukasz1

It would be an easy and fast way to triple the number of ASK files tested in unit testing

mhagmajer avatar Jul 03 '20 14:07 mhagmajer

Wait, args and results are the input and output, not the test.
Also, bear in mind that quantity != quality. These files would be mostly homogeneous, just storing one or two ints or strings, so we couldn't say we have 3 times as many [good] tests.

czerwinskilukasz1 avatar Jul 03 '20 15:07 czerwinskilukasz1

I am also thinking whether they are cases where it's much easier to define the expected output in TypeScript rather than AskScript.

czerwinskilukasz1 avatar Jul 03 '20 15:07 czerwinskilukasz1