Giter Club home page Giter Club logo

gopherjs's Introduction

gopherjs


https://github.com/gopherjs/gopherjs

// tests/gorepo_test.go

func TestGoRepositoryCompilerTests(t *testing.T) {
  if runtime.GOARCH == "js" {
    t.Skip("test meant to be run using normal Go compiler (needs os/exec)")
  }
  
  args := []string{"go", "run", "run.go", "--summary"}
  if testing.Verbose() {
    args = append(args, "-v")
  }
  cmd := exec.Command(args[0], args[1:]...)
  cmd.Stdout = os.Stdout
  err := cmd.Run()
  if err != nil {
    t.Fatal(err)
  }
}

func TestGopherJSCanBeVendored(t *testing.T) {
  if runtime.GOARCH == "js" {
    t.Skip("test meant to be run using normal Go compiler (needs os/exec)")
  }
  
  cmd := exec.Command("sh", "gopherjsvendored_test.sh")
  cmd.Stderr = os.Stdout
  got, err := cmd.Output()
  if err != nil {
    t.Fatal(err)
  }
  if want := "hello using js pkg\n"; string(got) != want {
    t.Errorf("unexpected stdout from gopherjsvendored_tes.sh:\ngot:\n%s\nwant:\n%s", got, want)
  }
}

gopherjs's People

Contributors

takagotch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.