go-playground icon indicating copy to clipboard operation
go-playground copied to clipboard

Test files cannot be played

Open maxatome opened this issue 1 year ago • 1 comments

Hi,

Using https://staging.goplay.tools/

Choose any test example (New Empty Test for example) then click Run

play: no non-test Go files in /tmp/sandbox1983726817

Thanks for your work!

maxatome avatar Feb 06 '24 10:02 maxatome

This issue is stale because it has been open for 15 days with no activity. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar Feb 22 '24 01:02 github-actions[bot]

@maxatome issue is caused by a bug in original Go Playground API - https://github.com/golang/go/issues/68327

Better Go Playground always explicitly send all file names to API, like this:

-- some_test.go --
package main

...

Looks like, their unit test detector doesn't like that. I will add workaround for that, but tests won't work if you have multiple files.

x1unix avatar Jul 07 '24 00:07 x1unix