Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Jest
Jest

1.3K
742
+ 1
120
PhantomJS
PhantomJS

329
233
+ 1
17
Add tool

Jest vs PhantomJS: What are the differences?

Jest: Painless JavaScript Unit Testing. Jest provides you with multiple layers on top of Jasmine; PhantomJS: Scriptable Headless WebKit. PhantomJS (www.phantomjs.org) is a headless WebKit scriptable with JavaScript. It is used by hundreds of developers and dozens of organizations for web-related development workflow.

Jest belongs to "Javascript Testing Framework" category of the tech stack, while PhantomJS can be primarily classified under "Headless Browsers".

Some of the features offered by Jest are:

  • Familiar Approach: Built on top of the Jasmine test framework, using familiar expect(value).toBe(other) assertions
  • Mock by Default: Automatically mocks CommonJS modules returned by require(), making most existing code testable
  • Short Feedback Loop: DOM APIs are mocked and tests run in parallel via a small node.js command line utility

On the other hand, PhantomJS provides the following key features:

  • Multiplatform, available on major operating systems: Windows, Mac OS X, Linux, and other Unices.
  • Fast and native implementation of web standards: DOM, CSS, JavaScript, Canvas, and SVG. No emulation!
  • Pure headless (no X11) on Linux, ideal for continuous integration systems. Also runs on Amazon EC2, Heroku, and Iron.io.

"Open source" is the top reason why over 24 developers like Jest, while over 12 developers mention "Scriptable web browser" as the leading cause for choosing PhantomJS.

Jest and PhantomJS are both open source tools. PhantomJS with 26.9K GitHub stars and 5.7K forks on GitHub appears to be more popular than Jest with 26.1K GitHub stars and 3.53K GitHub forks.

Repro, Glympse, and Ubiqua are some of the popular companies that use Jest, whereas PhantomJS is used by Key Location, Ghost Inspector, and Tailor Brands. Jest has a broader approval, being mentioned in 263 company stacks & 150 developers stacks; compared to PhantomJS, which is listed in 78 company stacks and 47 developer stacks.

What is Jest?

Jest provides you with multiple layers on top of Jasmine.

What is PhantomJS?

PhantomJS (www.phantomjs.org) is a headless WebKit scriptable with JavaScript. It is used by hundreds of developers and dozens of organizations for web-related development workflow.
Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Why do developers choose Jest?
Why do developers choose PhantomJS?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con

    Sign up to add, upvote and see more consMake informed product decisions

    What companies use Jest?
    What companies use PhantomJS?

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Jest?
    What tools integrate with PhantomJS?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Jest and PhantomJS?
    Mocha
    Mocha is a feature-rich JavaScript test framework running on node.js and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.
    Selenium
    Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.
    AVA
    Even though JavaScript is single-threaded, IO in Node.js can happen in parallel due to its async nature. AVA takes advantage of this and runs your tests concurrently, which is especially beneficial for IO heavy tests. In addition, test files are run in parallel as separate processes, giving you even better performance and an isolated environment for each test file.
    Jasmine
    Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, Node.js projects, or anywhere that JavaScript can run.
    Cypress
    Cypress is a front end automated testing application created for the modern web. Cypress is built on a new architecture and runs in the same run-loop as the application being tested. As a result Cypress provides better, faster, and more reliable testing for anything that runs in a browser. Cypress works on any front-end framework or website.
    See all alternatives
    Decisions about Jest and PhantomJS
    No stack decisions found
    Interest over time
    Reviews of Jest and PhantomJS
    Avatar of cristiangiagante
    .Net Developer at Hexacta
    Review ofJestJest

    I'm using Jest for 3 months in a Vue JS project . I need to use a lot of custom search of related topics in jest docs because it's not clear. The examples are very poor too.

    How developers use Jest and PhantomJS
    Avatar of Volkan ร–zรงelik
    Volkan ร–zรงelik uses JestJest

    Jest is my unit-testing tool of choice.

    Almost all unit testing suites (Mocha, Jasmine, etc.) are more or less the same.

    The main advantage I guess, is that it integrates pretty well with React and Enzyme.

    Avatar of fadingdust
    fadingdust uses PhantomJSPhantomJS

    We run PhantomJS as part of the CircleCI testing, comparing against other branches to ensure changes are limited to their intended scope.

    Avatar of Nough You
    Nough You uses PhantomJSPhantomJS

    Headless browsing, headless chrome is good too, this is not supported anymore.

    Avatar of ByeongGi
    ByeongGi uses PhantomJSPhantomJS
    • ์›น ํฌ๋กค๋ง(์Šคํ”„๋žฉํ•‘) ๊ณต๋ถ€๋ฅผ ์œ„ํ•ด์„œ ๊ฐ€์ƒ ๋ธŒ๋ผ์šฐ์ ธ์—์„œ ์ œ์ด์ฟผ๋ฆฌ๋ฅผ ๋กœ๋”ฉํ•˜์—ฌ ํŽ˜์ด์Šค๋ถ์—์„œ ๋ฌดํ•œ ์Šคํฌ๋กค์‹œ์— ๋ฐœ์ƒ ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ˆ˜์ง‘ํž˜
    Avatar of Veggie Sailor
    Veggie Sailor uses PhantomJSPhantomJS

    Functional tests / screenshots generation.

    Avatar of Alexpts Pts
    Alexpts Pts uses PhantomJSPhantomJS
    How much does Jest cost?
    How much does PhantomJS cost?
    Pricing unavailable
    Pricing unavailable