Run compiled Go tests in the browser using GopherJS
Import the browsertests package in one of your tests to ensure the browser interface is initialised:
import _ "bitbucket.org/mikehouston/browsertests"
To compile your tests, use GopherJS:
$ gopherjs test -c
<p>To recompile tests use <code>gopherjs test -c</code></p>
Then run the tests by opening the HTML file in a browser. The easiest way to do this is
to run the gopherjs serve command and navigate to the package you want to test.
$ go get -u bitbucket.org/mikehouston/browsertests