Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Build Status npm version


Go runner for Jest



Install jest version 21 or above and jest-runner-go:

With Yarn

yarn add -D jest jest-runner-go

With NPM

npm install --save-dev jest jest-runner-go

Add it to your project

Add the following to your package.json

"jest": {
	"moduleFileExtensions": [
	"runner": "jest-runner-go",
	"testMatch": [

Or to your jest.config.js

module.exports = {
  runner: 'jest-runner-go',
  moduleFileExtensions: ["go"],
  testMatch: ['**/?(*_)test.go'],

Then simply run Jest

yarn jest


  1. git pull (preferably in your GOPATH if you want to run the examples on your machine)
  2. Run npm install or yarn to install the dependencies of the project
  3. To build the project run yarn build
  4. To run the tests (unit and integration) yarn test or you can also run them using Docker with the Dockerfile provided in this project:
    docker build -t jest-runner-go .
    docker run jest-runner-go
  5. To run the example cd example && yarn test or you can also run it using Docker by running this command
    docker run -it jest-runner-go sh -c "cd example && yarn test"

If you want to test your development version of jest-runner-go on another project do the following:

  1. In the jest-runner-gofolder run yarn build && yarn link
  2. In your other projects run yarn link jest-runner-go

Your project will now use your local jest-runner-go.