Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maximeheckel/jest-runner-go
A Golang runner for Jest
https://github.com/maximeheckel/jest-runner-go
golang jest runner
Last synced: 3 months ago
JSON representation
A Golang runner for Jest
- Host: GitHub
- URL: https://github.com/maximeheckel/jest-runner-go
- Owner: MaximeHeckel
- License: mit
- Created: 2017-11-11T03:33:02.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-25T17:04:15.000Z (about 7 years ago)
- Last Synced: 2024-06-21T20:04:22.132Z (8 months ago)
- Topics: golang, jest, runner
- Language: JavaScript
- Size: 77.1 KB
- Stars: 22
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/MaximeHeckel/jest-runner-go.svg?branch=master)](https://travis-ci.org/MaximeHeckel/jest-runner-go) [![npm version](https://badge.fury.io/js/jest-runner-go.svg)](https://badge.fury.io/js/jest-runner-go)
![]()
## Usage
### Install
Install `jest` version 21 or above and `jest-runner-go`:
With `Yarn`
```bash
yarn add -D jest jest-runner-go
```With `NPM`
```bash
npm install --save-dev jest jest-runner-go
```### Add it to your project
Add the following to your `package.json`
```json
"jest": {
"moduleFileExtensions": [
"go"
],
"runner": "jest-runner-go",
"testMatch": [
"**/?(*_)test.go"
]
},
```Or to your `jest.config.js`
```js
module.exports = {
runner: 'jest-runner-go',
moduleFileExtensions: ["go"],
testMatch: ['**/?(*_)test.go'],
};
```Then simply run Jest
```
yarn jest
```### Contribute
1. `git pull [email protected]:MaximeHeckel/jest-runner-go.git` (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:
```bash
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
```bash
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-go`folder 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`.