deno: deno test --reporter junit get incorrect testsuite.name when use deno_std/testing/bdd.ts
//filename: test-reporter_test.ts
import { afterEach, beforeEach, it } from "https://deno.land/std@0.197.0/testing/bdd.ts";
import { assert } from "https://deno.land/std@0.197.0/assert/assert.ts";
it("test ok", ()=>{
assert(true);
})
$ deno test -A --reporter junit test-reporter_test.ts
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="deno test" tests="1" failures="0" errors="0" time="0.094">
<testsuite name="https://deno.land/std@0.197.0/testing/_test_suite.ts" tests="1" disabled="0" errors="0" failures="0">
<testcase name="test ok" time="0.009">
</testcase>
</testsuite>
</testsuites>
testsuite.name is https://deno.land/std@0.197.0/testing/_test_suite.ts, expect test-reporter_test.ts
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 27 (9 by maintainers)
Not really, this is what I meant:
This is really an internal API and not documented well in the contributing guide. Once you add a test like above in the
pass.outyou should add something like:I can’t say specifically if that will pass (most likely not), but please open a PR and we can work more easily from there.
I made the changes we referenced above for this part of the issue
Got some help over on Discord and got the integration tests running! This was the result:
I’ll go ahead and make the changes discussed earlier for this issue and rerun them.
Hey just wanted to give you a monday morning update. Over the weekend I had some trouble getting the repo running properly, ended up realizing that I missed the documentation on
building it from the source. After following the instructions there everything seems to be working, I’m planning on making the changes we talked about later today.@HoldUpFjord probably declared at the top level of the file - it would be used in several places in that file.
Awesome! I’ll get write on that then 😃 I’ll comment if I have any more questions or any updates. Appreciate all the support.
@HoldUpFjord so I would suggest to proceed as follows:
getTestCaseLocation()helper functiontestDesc.location = location) change the code to betestDesc.location = testDesc[Symbol.for("Deno.test.location")] || getTestCaseLocation()std/bdd.tsto assign properSymbol.for("Deno.test.location")when the test cases are createdAwesome! Thanks so much @bartlomieju