Giter Site home page Giter Site logo

majestic's Introduction

logo Wiretap

⚗ Zero config UI for Jest ⚗

What is Majestic?

Majestic is an electron app for running tests with Jest. Majestic is a tool built for providing great developer experience when you write tests with Jest.

Jest CLI itself is one of the best CLI experience you can get out there today. But Majestic tries to bring that CLI experience in a form of a UI app.

Features

  • Run the whole project, a file or a particular test with a click
  • Watch the whole project, a file or a test
  • Update specific snapshots with a click
  • Inline coverage reports
  • Zero configuration (Sorry, I had to)
  • Support for typescript projects
  • Support for Create-react-app out of the box
  • Quick search to search across all your test (It) statements
  • Failure summary shows all test failtures in a single screen. Useful when you have failures across multiple files.
  • Locate a specific test in your editor with a click of a button

Download the app

External Jest configuration file

Ok, I lied partially about the zero config part.

Majestic is a zero config tool if you keep all your jest configuration in the package.json file.

If you have an external jest config file, you should have a jestConfig key in the package.json pointing to the file as shown below.

{
  "name": "my-awesome-proj",
  "version": "0.1.0",
  "description": "..",
  "jestConfig": "./jest-custom.config.js"
}

Enabling coverage report

Majestic displays coverage reports generated by Jest. So make sure to have HTML coverage report configured so Majestic can display them.

Configuring Jest with Html coverage report

It's really simple.

{
  "collectCoverage": true,
  "coverageReporters": ["html"]
}

Configuring coverage in a create-react-app project

- "test": "react-scripts test --env=jsdom",
+ "test": "react-scripts test --env=jsdom --coverage",

Contribute

Majestic relies on jest-editor-support, a module from jest, which allows to execute jest programmatically.

git clone https://github.com/facebook/jest.git
cd jest
yarn install

# link jest-editor-support
cd packages/jest-editor-support
yarn link

Now let's setup majestic.

git clone https://github.com/Raathigesh/majestic.git
cd majestic

# this would install and would do a yarn link for jest-editor-support
yarn install

# start the app
yarn dev

Inspiration

This tool is inspired by https://wallabyjs.com/. Check them out.

Thanks

Thank you @orta for building VSCode Jest and doing the heavy lifting.

Contributors


Raathigeshan

💻 📖 💬 👀 🤔 🎨

This project follows the all-contributors specification. Contributions of any kind are welcome!

License

MIT © Raathigeshan

majestic's People

Contributors

acateland avatar azz avatar raathigesh avatar ss18 avatar

Watchers

 avatar  avatar  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.