An open API service indexing awesome lists of open source software.

https://github.com/Raathigesh/majestic

⚑ Zero config GUI for Jest
https://github.com/Raathigesh/majestic

developer-experience developer-tools jest react

Last synced: about 2 months ago
JSON representation

⚑ Zero config GUI for Jest

Awesome Lists containing this project

README

        













Join the community on Spectrum


Majestic is a GUI for [Jest](https://jestjs.io/)

- βœ… Run all the tests or a single file
- ⏱ Toggle watch mode
- πŸ“Έ Update snapshots
- ❌ Examine test failures as they happen
- ⏲ Console.log() to the UI for debugging
- πŸš” Built-in coverage report
- πŸ” Search tests
- πŸ’Ž Works with flow and typescript projects
- πŸ“¦ Works with Create react app

> Majestic supports Jest 20 and above

### Get started

Run majestic via `npx` in a project directory

```bash
cd ./my-jest-project # go into a project with Jest
npx majestic # execute majestic
```

or install Majestic globally via Yarn and run majestic

```bash
yarn global add majestic # install majestic globally
cd ./my-jest-project # go into a project with Jest
majestic # execute majestic
```

or install Majestic globally via Npm and run majestic

```bash
npm install majestic -g # install majestic globally
cd ./my-jest-project # go into a project with Jest
majestic # execute majestic
```

### Running as an app

Running with the `--app` flag will launch Majestic as a chrome app.

### Optional configuration

You can configure Majestic by adding `majestic` key to `package.json`.

```javascript
// package.json
{
"majestic": {
// if majestic fails to find the Jest package, you can provide it here. Should be relative to the package.json
"jestScriptPath": "../node_modules/jest/bin/jest.js",
// if you want to pass additional arguments to Jest, do it here
"args": ['--config=./path/to/config/file/jest.config.js'],
// environment variables to pass to the process
"env": {
"CI": "true"
}
}
}
```

#### Optional configuration in project with multiple Jest configuration files

```javascript
{
"majestic": {
"jestScriptPath": "../node_modules/jest/bin/jest.js",
"configs": {
"config1": {
"args": [],
"env": {}
},
"config2": {
"args": [],
"env": {}
}
}
}
}
```

### Arguments

`--config` - Will use this config from the list supplied in optional configuration.

`--debug` - Will output extra debug info to console. Helps with debugging.

`--noOpen` - Will prevent from automatically opening the UI url in the browser.

`--port` - Will use this port if available, else Majestic will pick another free port.

`--version` - Will print the version of Majestic and will exit.

### Shortcut keys

`alt+t` - run all tests

`alt+enter` - run selected file

`alt+w` - watch

`alt+s` - search

`escape` - close search

### Troubleshooting

Have a look at some of the [common workarounds](./Troubleshooting.md).

### Contribute

Have a look at the [contribution guide](./CONTRIBUTING.MD).

## Contributors

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Duncan Beevers

πŸ’»

Max Bridgland

πŸ“– πŸ€” πŸ› πŸ’»

Yuraima Estevez

πŸ’»

Jake Crosby

πŸ’»

Gavin Henderson

πŸ’»

briwa

πŸ’»

Luan Ferreira

πŸ’»



Tushar Gupta

πŸ’»

Agusti Fernandez

πŸ’» πŸ€”

Moos

πŸ› πŸ’» πŸ“–

MacZel

πŸ’» πŸ€”

Vikram Dighe

πŸ’»

John Smey

πŸ’» πŸ€” πŸ›

BuckAMayzing

πŸ’» πŸ›



Rahul A. Krishna

πŸ’» πŸ€” πŸ”§

Amila Welihinda

πŸš‡

gregveres

πŸ› πŸ’»

adam klein

⚠️ πŸ’»

RaphaΓ«l Barbazza

πŸ’»

Phil Alsford

πŸ“–

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!