gopherjs icon indicating copy to clipboard operation
gopherjs copied to clipboard

gopherjs test should behave like go test with no test files

Open myitcv opened this issue 7 years ago • 1 comments

Given the testscript:

env HOME=$WORK/home
mkdir $HOME
env GOPATH=$WORK/go
go mod edit -require=github.com/gopherjs/[email protected] -replace=github.com/gopherjs/gopherjs=$SELF

go mod download

# go
! go test

# gopherjs
! gopherjs test

-- go.mod --
module mod

-- blah.go --
package blah

var _ = asdf

We get the following failure:

$ go test -run="TestScripts/test_no_tests"
--- FAIL: TestScripts (0.04s)
    --- FAIL: TestScripts/test_no_tests (0.33s)
        testscript.go:228:
            # go (0.067s)
            # gopherjs (0.189s)
            > ! gopherjs test
            [stdout]
            ?           mod     [no test files]
            FAIL: testdata/test_no_tests.txt:12: unexpected command success

FAIL
exit status 1
FAIL    github.com/gopherjs/gopherjs    0.411s

myitcv avatar Dec 06 '18 21:12 myitcv

Spotted originally in https://github.com/gopherjs/gopherjs/issues/883#issuecomment-445014908

myitcv avatar Dec 06 '18 21:12 myitcv