Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Prev Previous commit
Next Next commit
Updated test to allow importing github.com/gopherjs/gopherjs/js/*
  • Loading branch information
r-l-x committed Apr 20, 2018
commit b9ca91560cbe133389dc16d872dda259a4a3be90
6 changes: 3 additions & 3 deletions build/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func TestNativesDontImportExtraPackages(t *testing.T) {
if err != nil {
t.Fatalf("strconv.Unquote(%v): %v", imp.Path.Value, err)
}
if importPath == "github.com/gopherjs/gopherjs/js" {
if strings.HasPrefix(importPath, "github.com/gopherjs/gopherjs/js") {
continue
}
if _, ok := realImports[importPath]; !ok {
Expand Down Expand Up @@ -133,7 +133,7 @@ func TestNativesDontImportExtraPackages(t *testing.T) {
if err != nil {
t.Fatalf("strconv.Unquote(%v): %v", imp.Path.Value, err)
}
if importPath == "github.com/gopherjs/gopherjs/js" {
if strings.HasPrefix(importPath, "github.com/gopherjs/gopherjs/js") {
continue
}
if _, ok := realTestImports[importPath]; !ok {
Expand Down Expand Up @@ -175,7 +175,7 @@ func TestNativesDontImportExtraPackages(t *testing.T) {
if err != nil {
t.Fatalf("strconv.Unquote(%v): %v", imp.Path.Value, err)
}
if importPath == "github.com/gopherjs/gopherjs/js" {
if strings.HasPrefix(importPath, "github.com/gopherjs/gopherjs/js") {
continue
}
if _, ok := realXTestImports[importPath]; !ok {
Expand Down