Get Advice Icon

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

Jest
Jest

1.4K
795
+ 1
120
Sublime Text
Sublime Text

11.1K
8.5K
+ 1
3.8K
Add tool

Jest vs Sublime Text: What are the differences?

Developers describe Jest as "Painless JavaScript Unit Testing". Jest provides you with multiple layers on top of Jasmine. On the other hand, Sublime Text is detailed as "A sophisticated text editor for code, markup and prose". Sublime Text is available for OS X, Windows and Linux. One license is all you need to use Sublime Text on every computer you own, no matter what operating system it uses Sublime Text uses a custom UI toolkit, optimized for speed and beauty, while taking advantage of native functionality on each platform..

Jest and Sublime Text are primarily classified as "Javascript Testing Framework" and "Text Editor" tools respectively.

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, Sublime Text provides the following key features:

  • Goto Anything
  • Multiple Selections
  • Command Palette

"Open source" is the top reason why over 24 developers like Jest, while over 698 developers mention "Lightweight" as the leading cause for choosing Sublime Text.

Jest is an open source tool with 26.4K GitHub stars and 3.57K GitHub forks. Here's a link to Jest's open source repository on GitHub.

Lyft, Typeform, and Starbucks are some of the popular companies that use Sublime Text, whereas Jest is used by Airbnb, Facebook, and Instagram. Sublime Text has a broader approval, being mentioned in 1407 company stacks & 1333 developers stacks; compared to Jest, which is listed in 271 company stacks and 161 developer stacks.

- No public GitHub repository available -

What is Jest?

Jest provides you with multiple layers on top of Jasmine.

What is Sublime Text?

Sublime Text is available for OS X, Windows and Linux. One license is all you need to use Sublime Text on every computer you own, no matter what operating system it uses. Sublime Text uses a custom UI toolkit, optimized for speed and beauty, while taking advantage of native functionality on each platform.
Get Advice Icon

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

Why do developers choose Jest?
Why do developers choose Sublime Text?

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

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

What companies use Jest?
What companies use Sublime Text?

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

What tools integrate with Jest?
What tools integrate with Sublime Text?

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

What are some alternatives to Jest and Sublime Text?
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 Sublime Text
Jerome Dalbert
Jerome Dalbert
Senior Backend Engineer at StackShare | 12 upvotes 58.5K views
Visual Studio Code
Visual Studio Code
Atom
Atom
Vim
Vim
Sublime Text
Sublime Text
#TextEditor

I liked Sublime Text for its speed, simplicity and keyboard shortcuts which synergize well when working on scripting languages like Ruby and JavaScript. I extended the editor with custom Python scripts that improved keyboard navigability such as autofocusing the sidebar when no files are open, or changing tab closing behavior.

But customization can only get you so far, and there were little things that I still had to use the mouse for, such as scrolling, repositioning lines on the screen, selecting the line number of a failing test stack trace from a separate plugin pane, etc. After 3 years of wearily moving my arm and hand to perform the same repetitive tasks, I decided to switch to Vim for 3 reasons:

  • your fingers literally don鈥檛 ever need to leave the keyboard home row (I had to remap the escape key though)
  • it is a reliable tool that has been around for more than 30 years and will still be around for the next 30 years
  • I wanted to "look like a hacker" by doing everything inside my terminal and by becoming a better Unix citizen

The learning curve is very steep and it took me a year to master it, but investing time to be truly comfortable with my #TextEditor was more than worth it. To me, Vim comes close to being the perfect editor and I probably won鈥檛 need to switch ever again. It feels good to ignore new editors that come out every few years, like Atom and Visual Studio Code.

See more
Johnny Bell
Johnny Bell
Senior Software Engineer at StackShare | 17 upvotes 75.3K views
Prettier
Prettier
Git
Git
Magento
Magento
Sublime Text
Sublime Text
PhpStorm
PhpStorm
Visual Studio Code
Visual Studio Code
#PHP
#Frontend

I've been in the #frontend game for about 7 years now. I started coding in Sublime Text because all of the tutorials I was doing back then everyone was using it. I found the speed amazing compared to some other tools at the time. I kept using Sublime Text for about 4-5 years.

I find Sublime Text lacks some functionality, after all it is just a text editor rather than a full fledged IDE. I finally converted over to PhpStorm as I was working with Magento and Magento as you know is mainly #PHP based.

This was amazing all the features in PhpStorm I loved, the debugging features, and the control click feature when you click on a dependency or linked file it will take you to that file. It was great.

PhpStorm is kind of slow, I found that Prettier was taking a long time to format my code, and it just was lagging a lot so I was looking for alternatives. After watching some more tutorial videos I noticed that everyone was using Visual Studio Code. So I gave it a go, and its amazing.

It has support for everything I need with the plugins and the integration with Git is amazing. The speed of this IDE is blazing fast, and I wouldn't go back to using PhpStorm anymore. I highly recommend giving Visual Studio Code a try!

See more
Dschinkel Schinkel
Dschinkel Schinkel
Enzyme
Enzyme
React
React
JavaScript
JavaScript
Jest
Jest
Mocha
Mocha
#Testdrivendevelopment
#Bdd
#Tdd

I use both mocha and Jest because:

  • I don't care whether teams use Jest or Mocha. But jest is way too overhyped. Most devs are writing integration tests and think that it's so much better but frankly I don't write integration tests as the way to get both design feedback and confidence when I code. I adhere to the test pyramid, not ice cream cone or the dumb "trophy"

  • I TDD, so I only ever use the "API" of test frameworks. I don't do a lot of integration tests for TDD and all the bells and whistles Jest provides you from the command-line I just don't need. And I certainly do not care about or touch Jest Snapshots, I despise them

  • My tests are fast enough because I write isolated tests with TDD, so I don't run into performance issues. Example: I write my tests in a way that I can run 300 tests in literally 1 second with mocha. So the Jest ability to pinpoint and only run those tests which are affected by code changes. I want to run all of them every time when I TDD. It's a different mindset when you TDD

  • I also mainly code in IntelliJ or WebStorm because I feel the tools in that IDE far surpass VSCode and I also love running the test UI runner in it vs. lousy command-line

  • I feel both mocha and Jest read just fine in terms of code readability. Jest might have shorter assertion syntax but I don't really care. I just care that I can read the damn test and my tests are written well and my test descriptions, as well as the code itself including constants represent business language, not technical. I care most about BDD, clean code, 4 rules of simple design, and SOLID

  • I don't like using mock frameworks so no I don't use Jest's Mocking framework. I don't have to mock a lot in my tests due to the nature of how I strive to code...I keep my design simple and modular using principals such as clean code and 4 rules of simple design. If I must mock, I create very simple custom mocks with JS

  • On the contrary to the belief that integration tests and mount are the way to go (this belief drives me absolutely crazy, especially Dodd's promoting that), I TDD with shallow & enzyme. My tests are simple. My design is driven by my tests and my tests give me quick and useful feedback. I have a course I'm working on coming out soon on TDD with React to show you how to truly test the FE and why the ice cream cone and trophy suck (you're being scammed people). Watch for that here: https://twitter.com/DaveSchinkel/status/1062267649235791873

Don't forget to upvote this post!

Mocha Jest JavaScript React @jsdom Enzyme #tdd #bdd #testdrivendevelopment

See more
Atom
Atom
Sublime Text
Sublime Text

I used to be a hardcore fan of Sublime Text. I am not a coder so I only use it for quick scripts or to play around. I don't spend hours and hours a day within Sublime Text though. However, last year (2017) a colleague, a developer, showed me Atom - a game changer. Love the customisation and overall feel while coding. Again, I am not spending hours a day within but I've noticed I've spent more time playing around and coding stuff since i've moved to Atom.

See more
Russel Werner
Russel Werner
Lead Engineer at StackShare | 7 upvotes 53.6K views
atStackShareStackShare
Percy
Percy
Happo.io
Happo.io
React Storybook
React Storybook
Enzyme
Enzyme
Jest
Jest

We use Jest because when we rebooted our "front end" stack earlier last year, we need to have a testing solution (we didn't have any front-end tests before that!). Jest is fast and convenient and it has plenty of community support behind it. It let's us run our unit tests with Enzyme and snapshot tests.

This is an area that we are constantly reviewing to see what can be improved, both in terms of developer needs, accuracy, test maintainability, and coverage.

I'm currently exploring using React Storybook to be the record of snapshot tests and using some online services, such as Happo.io and Percy in our CI pipeline.

See more
Scott Mebberson
Scott Mebberson
CTO / Chief Architect at Idearium | 2 upvotes 20.8K views
Jest
Jest
Mocha
Mocha

We used to Mocha for as our primary Node.js test framework. We've now switched to Jest and haven't looked back.

Jest is faster and requires less setup and configuration. The Mocha API and eco-system is vast and verified, but that also brings complexity.

It you want to get in, write tests, execute them and get out, try Jest 馃榾

See more
Julian Sanchez
Julian Sanchez
Lead Developer at Chore Champion | 8 upvotes 29.3K views
atChore ChampionChore Champion
Sublime Text
Sublime Text
Atom
Atom
Visual Studio Live Share
Visual Studio Live Share
Sublime Merge
Sublime Merge
Git
Git
Visual Studio Code
Visual Studio Code

We use Visual Studio Code because it allows us to easily and quickly integrate with Git, much like Sublime Merge ,but it is integrated into the IDE. Another cool part about VS Code is the ability collaborate with each other with Visual Studio Live Share which allows our whole team to get more done together. It brings the convenience of the Google Suite to programming, offering something that works more smoothly than anything found on Atom or Sublime Text

See more
Sublime Text
Sublime Text
Atom
Atom
Visual Studio Code
Visual Studio Code

I use Visual Studio Code because it is a super flexible code editor that can be customized to function like a full IDE. It has great git and terminal integrations out of the box compared to Atom and Sublime Text

It has so many extensions and boots up pretty fast even with all my extensions.

Feel free to checkout my settings: VS Code Settings

See more
Gustavo Mu帽oz
Gustavo Mu帽oz
Web UI Developer at Globant | 3 upvotes 26.7K views
TypeScript
TypeScript
Flutter
Flutter
React
React
Notepad++
Notepad++
Vim
Vim
Sublime Text
Sublime Text
Atom
Atom
Visual Studio Code
Visual Studio Code
#Microsoft
#RESTfulAPI

I have chosen Visual Studio Code after testing a lot of other editors like Atom, Sublime Text (with legal license), Vim or even Notepad++ because it is the sum of all their virtues and none of their defects. It's fast, it has all the tools and plugins I need to work, and it's pretty and very good optimized. It has what I need to work and nothing more. And the main plugins works like a charm. Developing for React or Flutter is amazing. Even the TypeScript plugin works great. I like how IntelliSense works, and all the extra tools to code remotely using #ssh, access #RESTfulAPI or event manage projects or collaborating remotely. Thanks #Microsoft for Visual Studio Code.

See more
Gustavo Mu帽oz
Gustavo Mu帽oz
Web UI Developer at Globant | 1 upvotes 1.6K views
Enzyme
Enzyme
Jest
Jest

I really enjoy using Jest as my testing framework. I also use Enzyme to complement, and both together are amazing. Jest is fast and easy to use, It has all you need together under the same tool, and it's pretty easy to create all kind of test, even asynchronous ones. I was responsible for implant it in our company projects, and it was the best decision for testing.

See more
Labinator Team
Labinator Team
at Labinator | 13 upvotes 66.8K views
atLabinatorLabinator
Debian
Debian
Manjaro
Manjaro
Visual Studio Code
Visual Studio Code
Sublime Text
Sublime Text
WordPress
WordPress
PHP
PHP
Vanilla.JS
Vanilla.JS
Sass
Sass
CSS 3
CSS 3
HTML5
HTML5

At labinator.com, we use HTML5, CSS 3, Sass, Vanilla.JS and PHP when building our premium WordPress themes and plugins. When writing our codes, we use Sublime Text and Visual Studio Code depending on the project. We run Manjaro and Debian operating systems in our office. Manjaro is a great desktop operating system for all range of tasks while Debian is a solid choice for servers.

WordPress became a very popular choice when it comes to content management systems and building websites. It is easy to learn and has a great community behind it. The high number of plugins as well that are available for WordPress allows any user to customize it depending on his/her needs.

For development, HTML5 with Sass is our go-to choice when building our themes.

Main Advantages Of Sass:

  • It's CSS syntax friendly
  • It offers variables
  • It uses a nested syntax
  • It includes mixins
  • Great community and online support.
  • Great documentation that is easy to read and follow.

As for PHP, we always thrive to use PHP 7.3+. After the introduction of PHP 7, the WordPress development process became more stable and reliable than before. If you a developer considering PHP 7.3+ for your project, it would be good to note the following benefits.

The Benefits Of Using PHP:

  • Open Source.
  • Highly Extendible.
  • Easy to learn and read.
  • Platform independent.
  • Compatible with APACHE.
  • Low development and maintenance cost.
  • Great community and support.
  • Detailed documentation that has everything you need!

Why PHP 7.3+?

  • Flexible Heredoc & Nowdoc Syntaxes - Two key methods for defining strings within PHP. They also became easier to read and more reliable.
  • A good boost in performance speed which is extremely important when it comes to WordPress development.
See more
Jack Graves
Jack Graves
Head of Product Development at Automation Consultants | 3 upvotes 25K views
atAutomation ConsultantsAutomation Consultants
Mocha
Mocha
Apache JMeter
Apache JMeter
Jest
Jest
JUnit
JUnit

We use JUnit and Jest to perform the bulk of our automated test scenarios, with additional work with Apache JMeter for performance testing - for example, the Atlassian Data Center compliance testing is performed with JMeter. Jest provides testing for the React interfaces, which make up the backend of our App offerings. JUnit is used for Unit Testing our Server-based Apps. Mocha is another tool we use.

See more
Robert Zuber
Robert Zuber
CTO at CircleCI | 15 upvotes 268.5K views
atCircleCICircleCI
Cypress
Cypress
Percy
Percy
Jest
Jest
Apollo
Apollo
GraphQL
GraphQL
Emotion
Emotion
TypeScript
TypeScript
Storybook
Storybook
React
React
Next.js
Next.js

We are in the process of adopting Next.js as our React framework and using Storybook to help build our React components in isolation. This new part of our frontend is written in TypeScript, and we use Emotion for CSS/styling. For delivering data, we use GraphQL and Apollo. Jest, Percy, and Cypress are used for testing.

See more
Interest over time
Reviews of Jest and Sublime Text
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.

Avatar of Shivafeb17
Senior Web Developer at Adjetter Media Network Pvt Ltd
Review ofSublime TextSublime Text

There are many Text Editors and IDEs available for PHP. Sublime Text is the best of all. Super lite-weight.

How developers use Jest and Sublime Text
Avatar of Ana Phi Sancho
Ana Phi Sancho uses Sublime TextSublime Text

Self taught : acquired knowledge or skill on one's own initiative.Switching between projects is also lightning fast. Clean interface, quick startup, superb flexibility and powerful features. Platform: OSX 10.8 or later, Windows 7 & 8, Linux

Avatar of Dan Ward
Dan Ward uses Sublime TextSublime Text

My favorite code editor. So much power and elegance in one package, and more plugins than you can shake a stick at! And the Package Control package manager makes it easy to keep up with them all.

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 A. M. Douglas
A. M. Douglas uses Sublime TextSublime Text

It's simple and very malleable. You can use it anywhere. You can customise it to behave as you want it to behave, look as you want it to look. And you can use it on any desktop operating system.

Avatar of David Flynn
David Flynn uses Sublime TextSublime Text

We use this as it has some great text editing capabilities and a real time saver for when working on various data related tasks. This is simply a great text editor.

Avatar of Cooperative Computing
Cooperative Computing uses Sublime TextSublime Text

We found Sublime Text as the best text editor on the web. It's fast, reliable, cheap and have tons of extensions available with a big supportive community.

How much does Jest cost?
How much does Sublime Text cost?
Pricing unavailable
Pricing unavailable