Mqx
Mqx16mo ago

Generate jUnit XML file from Deno Tests

Hey is it possible that the Deno Test suite generates a jUnit XML about the Test? So that I can display the results on GitLab/GitHub?
7 Replies
marvinh.
marvinh.16mo ago
I think it landed somewhat recently in deno behind the --unstable flag. See https://github.com/denoland/deno/pull/19747
Mqx
MqxOP16mo ago
Nice. Does this already work? And if so how can I use it?
marvinh.
marvinh.16mo ago
Did you try the steps in the PR? It lists the following command deno test -A --unstable --junit=./report.xml path/to/my_test.ts
Mqx
MqxOP16mo ago
Yea I tried that but it gives me an error saying that --junit is not a valid argument. I am also running the latest version of Deno
deno 1.35.3
deno 1.35.3
AapoAlas
AapoAlas16mo ago
That looks like you have an emdash instead of two dashes in the argument.
Mqx
MqxOP16mo ago
No there are 2 -- it just looks diffrent. I have tried every possible combination. It was written from mobile that's the reason why it looked that way. But it still does not work xD
cdoremus
cdoremus16mo ago
Deno Blog
Deno 1.36: More flexible security and expanded testing APIs
Deno 1.36 introduces new runtime security options plus expanded testing and benchmarking APIs.