A Golang runner for Jest
MIT License
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 the following to your package.json
"jest": {
"moduleFileExtensions": [
"go"
],
"runner": "jest-runner-go",
"testMatch": [
"**/?(*_)test.go"
]
},
Or to your jest.config.js
module.exports = {
runner: 'jest-runner-go',
moduleFileExtensions: ["go"],
testMatch: ['**/?(*_)test.go'],
};
Then simply run Jest
yarn jest
git pull [email protected]:MaximeHeckel/jest-runner-go.git
(preferably in your GOPATH if you want to run the examples on your machine)npm install
or yarn
to install the dependencies of the projectyarn build
yarn test
orDockerfile
provided in this project:
docker build -t jest-runner-go .
docker run jest-runner-go
cd example && yarn test
ordocker 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:
jest-runner-go
folder run yarn build && yarn link
yarn link jest-runner-go
Your project will now use your local jest-runner-go
.