Open EspenBrun opened 2 years ago
I think it's theoretically possible. I looked into it many years ago but deemed it not worth the effort. If someone wants to fix it, feel free to create a PR though.
Ok, thanks for the reply.
Hi,
I'm not sure if this is exactly the same situation or just similar, but -
If I have this test code
[<Tests>]
let tests =
testList "samples" [
testCase "universe exists (╭ರᴥ•́)" <| fun _ ->
let subject = true
Expect.isTrue subject "I compute, therefore I am."
testTask "I am (should fail)" {
"╰〳 ಠ 益 ಠೃ 〵╯" |> Expect.equal true false
}
]
Then both tests appear in the Visual Studio 2022 test explorer, but the testCase
has source information and the right click go to test
menu works:
but the testTask
says No source available
and go to test
doesn't work:
Based on the previous comments I'm not sure how much this is expected to work though?
Based on the previous comments I'm not sure how much this is expected to work though?
I do not either 😅. I'm actually more surprised that you get source information for the test case. That being said, just to let you know the state of this repo, I've not used F# nor Expecto in years (beyond maintaining this repo). So while I do spend some effort keeping this repo up to date with dependencies, and try to fix bugs that show up, don't expect new features to show up without somebody contributing them. In this case, I don't even know what a testTask
is.
That being said, given that you have a use-case where you have one node with source information, and one without, it should be possible to debug your way to what's different between the two.
I don't even know what a testTask is
It's for testing Task based async code (though there isn;t any async in the minimal example).
I'll have a go at debugging it.
Ok, I tried debugging just the Expecto side, and it looks like the Expecto getLocation
function, as called from
doesn't seem to be returning anything useful for either test tasks or test theories, the if the adaptor is depending on that then maybe the issue is in Expecto rather than here.
That's very possible. I've not looked at how this is handled in years, so I don't have much recollection of it. Don't expect me to fix this, though if you want to work on it, I'm more than happy to look at PRs and similar.
Hello,
I noticed that "Jump to source" from the test explorer does not work. Is it possible to fix this? Or if it is already supported, add the steps needed to the readme.
Either way, thanks for creating this! So good to have be able to run Expecto tests in Rider.