<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>Wallaby.js Blog</title>
 <link href="http://dm.glhttp://dm.gl/atom.xml" rel="self"/>
 <link href="http://dm.glhttp://dm.gl/"/>
 <updated>2019-09-24T05:06:48+00:00</updated>
 <id>http://dm.gl</id>
 <author>
   <name>Artem Govorov</name>
   <email>artem.govorov@gmail.com</email>
 </author>

 
 <entry>
   <title>Code Coverage Report: the Wallaby Way</title>
   <link href="http://dm.glhttp://dm.gl//2016/09/06/wallaby-app-files/"/>
   <updated>2016-09-06T00:00:00+00:00</updated>
   <id>http://dm.gl/2016/09/06/wallaby-app-files</id>
   <content type="html">&lt;p&gt;Many of you have used several different code coverage solutions and reports. In this blog post we will explore some of the essential features of a code coverage report solution and introduce the way we have implemented them in wallaby.js app.&lt;/p&gt;

&lt;h3 id=&quot;file-tree&quot;&gt;File tree&lt;/h3&gt;

&lt;p&gt;First, a good JavaScript code coverage report should &lt;strong&gt;display an annotated project source code tree&lt;/strong&gt;. Folders is a natural way to organise your project code into modules or subsystems, and sometimes one may only be interested in focusing on a specific part of the project when working with code coverage metrics.&lt;/p&gt;

&lt;p&gt;Not many code coverage solutions bother to provide the tree, and it is sad, because the project file tree with node annotations is a great way to explore the code coverage for individual modules.&lt;/p&gt;

&lt;p&gt;Here’s an example from JetBrains IDEs:&lt;/p&gt;

&lt;p&gt;&lt;img width=&quot;391&quot; alt=&quot;screen shot 2016-09-05 at 4 45 37 pm&quot; src=&quot;https://cloud.githubusercontent.com/assets/979966/18241228/5172ae80-7393-11e6-90a5-4eaa02f40162.png&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;sortable-table&quot;&gt;Sortable table&lt;/h3&gt;

&lt;p&gt;Second, a good JavaScript code coverage report should provide an option to &lt;strong&gt;sort source files by coverage value&lt;/strong&gt;, also by a number of total/covered branches/lines/functions, whatever &lt;a href=&quot;https://en.wikipedia.org/wiki/Code_coverage&quot;&gt;criteria of the code coverage is used&lt;/a&gt;. It helps to quickly identify what files need more coverage.&lt;/p&gt;

&lt;p&gt;For example, let’s take a look at the Istanbul code coverage report:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/979966/18243212/742c9698-739d-11e6-90f5-40cbb4ab4acc.png&quot; alt=&quot;instanbul&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We are able to sort all folders, including any nested ones, by coverage, and also open an individual folder and sort its files.&lt;/p&gt;

&lt;p&gt;JetBrains IDEs provide a separate view, where you can sort by coverage in any selected folder, but for any nested subfolders you’ll only get an aggregated coverage and have to open it separately to see its files. It’s just like a file tree, but sortable on each individual level.&lt;/p&gt;

&lt;p&gt;&lt;img width=&quot;449&quot; src=&quot;https://cloud.githubusercontent.com/assets/979966/18243213/742e8ac0-739d-11e6-9b69-6de110a4bc98.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The issue here in both mentioned ways to present the data is that &lt;strong&gt;you can only sort files located in an opened folder, and for the files in its subfolders you can only see/sort by the aggregated values&lt;/strong&gt;. So it’s not possible to easily display a few least covered files in a whole project or a specific module folder with a few subfolders.&lt;/p&gt;

&lt;h3 id=&quot;the-wallaby-way&quot;&gt;The Wallaby Way&lt;/h3&gt;

&lt;p&gt;In the new &lt;a href=&quot;http://dm.gl/2016/07/19/wallaby-app/&quot;&gt;wallaby.js app&lt;/a&gt; coverage report we have decided to address the above mentioned issues and to &lt;strong&gt;efficiently combine both annotated project file tree and a selected folder/module sortable list of files&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The idea is very simple - you select a folder, and you get the full sortable table of all files in the folder and its subfolders (with a relative path where required).&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;bordered-image&quot; src=&quot;https://cloud.githubusercontent.com/assets/979966/18243650/60a80308-739f-11e6-8ed9-cfcfe3c7f7db.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This way you can &lt;strong&gt;both browse the tree structure, see the aggregated coverage values, select a folder/module, and easily find the least covered files no matter how deep your folder structure is&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can read more about Wallaby.js App and its other features in &lt;a href=&quot;http://dm.gl/2016/07/19/wallaby-app/&quot;&gt;our introductory blog post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That’s it for the post, thanks for reading! &lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;Follow us on Twitter&lt;/a&gt; to avoid missing new wallaby.js app features announcements.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Introducing Wallaby.js App: realtime bird's eye view of your project's tests connected to your editor</title>
   <link href="http://dm.glhttp://dm.gl//2016/07/19/wallaby-app/"/>
   <updated>2016-07-19T00:00:00+00:00</updated>
   <id>http://dm.gl/2016/07/19/wallaby-app</id>
   <content type="html">&lt;p&gt;When I think about tactics vs. strategy, one of my favourite video games always comes to mind - Heroes of Might and Magic (of course version III). It may sound like a strange opening line for a software development tool announcement, but bear with me.&lt;/p&gt;

&lt;p&gt;It is recognised by many JavaScript developers that &lt;a href=&quot;https://wallabyjs.com/&quot;&gt;wallaby.js&lt;/a&gt;, as a plugin for your code editor, is the &lt;strong&gt;great tactical level tool&lt;/strong&gt;. It increases your productivity by instantly providing the test results right where you need them just as you type your code. And like in a middle of the Heroes game battle you don’t care about you resources and castles and concentrate on your troops actions, when writing your code for a specific feature you don’t care much about how many tests you have and what’s the overall code coverage level.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/homm-st.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;However, when the battle is over and the feature’s tests are passing (and you maybe even levelled up), it’s often good to take a step back and get a bird’s eye view of the project. Since the very first release of wallaby.js, we have been getting requests to provide more &lt;strong&gt;strategic level features&lt;/strong&gt;, such as &lt;strike&gt;Castle View and World Map&lt;/strike&gt; Test Explorer or Code Coverage Reports.&lt;/p&gt;

&lt;p&gt;To implement the requests and create a foundation for future strategic level features, some time ago we have started to work on something we call &lt;strong&gt;wallaby.js app&lt;/strong&gt; and today I am happy to announce the &lt;strong&gt;release of wallaby.js app beta&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now, instead of providing a long installation guide, what if I told you that you can just open a URL in your browser to start using the app right now? &lt;strong&gt;It’s as simple as that: &lt;a href=&quot;http://wallabyjs.com/app&quot;&gt;wallabyjs.com/app&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;bordered-image&quot; src=&quot;/assets/app-main.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note that you need to have &lt;a href=&quot;https://wallabyjs.com/docs/config/overview.html&quot;&gt;wallaby.js configured&lt;/a&gt; and running in your editor (&lt;a href=&quot;https://wallabyjs.com/docs/intro/troubleshooting.html#forcing-wallabyjs-core-update&quot;&gt;core v1.0.257 or later&lt;/a&gt;) to use the most of the app.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For those of you who feel uncomfortable seeing the external URL, it’s worth mentioning that we just use it to host the app, which makes a connection to the locally running wallaby core. &lt;strong&gt;Wallaby.js doesn’t upload any of your project’s source code to the cloud&lt;/strong&gt;. If you like, you may easily check it in your browser’s Dev Tool Network panel. We’ll also be providing an npm package to install wallaby.js app locally and fully run from the &lt;code class=&quot;highlighter-rouge&quot;&gt;localhost&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Ok, let’s already check out what the app can do. In the first version we are releasing the &lt;strong&gt;Tests View&lt;/strong&gt; that allows you to quickly get tests-centric overview and analytics for your project.&lt;/p&gt;

&lt;p&gt;On the left hand side you can see the tree of your project tests. You may navigate it with the keyboard using arrow keys, plus &lt;code class=&quot;highlighter-rouge&quot;&gt;Cmd/Ctrl (Shift)&lt;/code&gt; to expand a node or the whole tree. For each tree node you may see the execution time (aggregated for files and test suites) and an &lt;strong&gt;indicator if some of the tests are slow&lt;/strong&gt;. A test is considered as slow if its execution time is greater than a &lt;a href=&quot;https://wallabyjs.com/docs/config/overview.html#slow-tests&quot;&gt;configurable value&lt;/a&gt;. With &lt;code class=&quot;highlighter-rouge&quot;&gt;mocha&lt;/code&gt; framework, the value can also be overriden by any &lt;code class=&quot;highlighter-rouge&quot;&gt;describe&lt;/code&gt; or &lt;code class=&quot;highlighter-rouge&quot;&gt;it&lt;/code&gt; using the &lt;a href=&quot;https://mochajs.org/#test-duration&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;this.slow&lt;/code&gt; function&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/979966/16866362/d1573cd2-4aae-11e6-85d0-73e0f172f0a3.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Before describing the rest, I’d like to mention that, despite being a strategic level tool, &lt;strong&gt;wallaby.js app is not a static report: almost everything gets updated automatically in realtime when you change your code&lt;/strong&gt;, add or remove files, increase code coverage, etc.&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;bordered-image&quot; src=&quot;https://cloud.githubusercontent.com/assets/979966/16867005/a388cc18-4ab2-11e6-8dfd-3535f109ce95.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For any file or test displayed anywhere in the app, you may &lt;strong&gt;open its location in your editor&lt;/strong&gt; by clicking the editor icon (or the stack entry/file link), or pressing &lt;code class=&quot;highlighter-rouge&quot;&gt;Cmd/Ctrl + Enter&lt;/code&gt; while in the tests tree.&lt;/p&gt;

&lt;p&gt;However, sometimes you may not want to leave the app to view the code, for example because you are not planning to change it right now. In this case you may use the eye icon or press &lt;code class=&quot;highlighter-rouge&quot;&gt;Enter&lt;/code&gt; for the selected tree node to &lt;strong&gt;open the source right inside the wallaby.js app&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;bordered-image&quot; src=&quot;https://cloud.githubusercontent.com/assets/979966/16867449/40882fac-4ab5-11e6-9b26-6f9b2310f484.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As you can see, the &lt;strong&gt;displayed file view provides a similar experience that you have in wallaby.js plugin for your editor&lt;/strong&gt; - you may see the coverage indicators, uncovered code regions and inline error/log messages.&lt;/p&gt;

&lt;p&gt;While being able to view some file or a test under your mouse is great, sometimes you may want to &lt;strong&gt;open any file of your project&lt;/strong&gt;. To do this, you may just use the magnifier icon next to the project name in the app header, or press &lt;code class=&quot;highlighter-rouge&quot;&gt;Shift&lt;/code&gt; twice, enter the file name and view it.&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;bordered-image&quot; src=&quot;https://cloud.githubusercontent.com/assets/979966/16867707/95af44ec-4ab6-11e6-95d5-d7c1ff2eb0e4.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;While in the tests tree, you may select a test or a file to see its details. The details include errors or &lt;code class=&quot;highlighter-rouge&quot;&gt;console.log&lt;/code&gt; messages logged while executing the test. If you select a test file, you’ll see the errors and log messages for all tests in the file.&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;bordered-image right-image&quot; style=&quot;max-width: 300px&quot; src=&quot;https://cloud.githubusercontent.com/assets/979966/16868066/f257fb6a-4ab8-11e6-8590-2787aaa71083.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;details of the selected test or test file also display the tree of the source files that are covered by the test&lt;/strong&gt;. Each file in the tree contains its current code coverage value. If the &lt;a href=&quot;https://wallabyjs.com/docs/config/overview.html#low-code-coverage-level&quot;&gt;value is too low&lt;/a&gt;, it is highlighted in yellow.&lt;/p&gt;

&lt;p&gt;The overall project code coverage and other project stats are also displayed in the top right corner.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Tests View&lt;/strong&gt; by no means is a final version, let us know what you’d like to be added or changed, your &lt;a href=&quot;https://github.com/wallabyjs/public/issues&quot;&gt;feedback is very welcome&lt;/a&gt;. In the upcoming weeks, we are planning to add the &lt;strong&gt;Coverage View&lt;/strong&gt; to provide file tree centric view of project code coverage, so stay tuned. You are also welcome to &lt;a href=&quot;https://github.com/wallabyjs/public/issues/675&quot;&gt;join the discussion&lt;/a&gt; and &lt;strong&gt;share your ideas&lt;/strong&gt; about what else you’d like to see in the app.&lt;/p&gt;

&lt;p&gt;That’s it for the post, thanks for reading! &lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;Follow us on Twitter&lt;/a&gt; to avoid missing new wallaby.js app features announcements.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Wallaby.js - Sublime Text integration release, Electron and AVA, Angular 2</title>
   <link href="http://dm.glhttp://dm.gl//2016/04/26/wallaby-sublime-electron-ava/"/>
   <updated>2016-04-26T00:00:00+00:00</updated>
   <id>http://dm.gl/2016/04/26/wallaby-sublime-electron-ava</id>
   <content type="html">&lt;p&gt;Almost 12 months ago we have started to sell first commercial licenses for &lt;a href=&quot;https://wallabyjs.com/&quot;&gt;wallaby.js&lt;/a&gt;, so on the 7th of May 2016 we are turning one year as a product. Like every business, we have had some ups and downs, but overall &lt;strong&gt;it’s been a great a year for us&lt;/strong&gt;. We keep growing steadily, adding new features and improving the tool’s quality.&lt;/p&gt;

&lt;p&gt;&lt;img style=&quot;max-width: 460px&quot; src=&quot;https://cloud.githubusercontent.com/assets/979966/14813161/c871330c-0be3-11e6-9ea2-2d6ba508f8fa.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Some &lt;strong&gt;exciting and ambitious plans&lt;/strong&gt; are prepared for the next year, some of them are &lt;a href=&quot;https://github.com/wallabyjs/public/issues/144#issuecomment-195327907&quot;&gt;very close for their first preview&lt;/a&gt;. But enough about the future plans, let’s see what we have already implemented in the last couple of months, and that you can use today.&lt;/p&gt;

&lt;p&gt;One thing I’d like to mention before jumping to the new features, is our new &lt;a href=&quot;https://wallabyjs.com/purchase/#upgrade&quot;&gt;License Upgrade and Renewal Calculator&lt;/a&gt;. Using the form you may quickly &lt;strong&gt;upgrade your existing license to ‘Freedom’&lt;/strong&gt; or &lt;strong&gt;renew your existing license&lt;/strong&gt;. All you need to do is just to paste your existing license key(s) or an email with the keys, and the form will display pricing options tailored for your case.&lt;/p&gt;

&lt;h2 id=&quot;sublime-text-integration&quot;&gt;Sublime Text integration&lt;/h2&gt;

&lt;p&gt;Many of you have been eagerly waiting so long for the integration. We have been brushing up the first preview version released earlier this year and finally Sublime Text integration beta program has ended earlier this month, so licenses are available for purchasing.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/979966/12607617/0f90535c-c522-11e5-8838-2ee91b33b30f.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you haven’t done it already, &lt;a href=&quot;http://wallabyjs.com/docs/intro/get-started-sublime.html&quot;&gt;check out our tutorial&lt;/a&gt; and also make sure to upgrade to the latest version of the package in Sublime Text.&lt;/p&gt;

&lt;h2 id=&quot;electron-runner-support&quot;&gt;Electron runner support&lt;/h2&gt;

&lt;p&gt;Being able to run your tests in a headless browser, such as PhantomJs, is awesome for many reasons. Still, sometimes you may want to run your unit tests in a real browser, and not to just occasionally verify that your test suite passes in that browser, but in a continuous testing tool like wallaby.js as well.&lt;/p&gt;

&lt;p&gt;For example, you may want to &lt;strong&gt;use the latest Chrome/V8&lt;/strong&gt; features, possibly without Babel, or use some features that &lt;a href=&quot;https://kangax.github.io/compat-table/es6/&quot;&gt;Babel doesn’t support&lt;/a&gt;. Or you may want to TDD your way through some of your app features that are using Web Audio API (that PhantomJs doesn’t support). Or you just got tired of using various polyfills in your test environment.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/electron.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Even though wallaby.js supports the &lt;a href=&quot;https://wallabyjs.com/docs/integration/phantomjs2.html&quot;&gt;latest PhantomJs builds&lt;/a&gt;, up until recently PhantomJs was the only option to run your unit tests in browser environment with wallaby. Now we also have added &lt;a href=&quot;http://electron.atom.io/&quot;&gt;Electron&lt;/a&gt; test runner support.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://wallabyjs.com/docs/integration/electron.html&quot;&gt;It’s very simple to use&lt;/a&gt;: you just install the &lt;code class=&quot;highlighter-rouge&quot;&gt;electron-prebuilt&lt;/code&gt; NPM package, specify &lt;code class=&quot;highlighter-rouge&quot;&gt;kind: 'electron'&lt;/code&gt; in your &lt;code class=&quot;highlighter-rouge&quot;&gt;env&lt;/code&gt; setting in wallaby config. That’s it, now you are ready to run your tests in the latest Chromium/V8 environment without any opened browsers windows and other related distractions.&lt;/p&gt;

&lt;h2 id=&quot;ava-support&quot;&gt;AVA support&lt;/h2&gt;

&lt;p&gt;&lt;img style=&quot;max-width: 230px&quot; class=&quot;right-image&quot; src=&quot;https://github.com/sindresorhus/ava/raw/master/media/header.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you are doing node.js testing, then you have probably heard of, and maybe even are using, &lt;a href=&quot;https://github.com/sindresorhus/ava#why-ava&quot;&gt;AVA testing framework and test runner&lt;/a&gt;. As a testing framework, &lt;strong&gt;AVA is minimal, has a simple test syntax and supports a few nice ways to write async tests&lt;/strong&gt; (such as returning a promise or an observable, generator or async functions). As a test runner, AVA does a few cool things that wallaby.js brings to other testing frameworks, such as running tests files in separate processes.&lt;/p&gt;

&lt;p&gt;We have started prototyping AVA support in wallaby.js a while ago and a few things changed in AVA since then. Now when the runner looks pretty stable, we are happy to announce that we have added its experimental support in wallaby.js.&lt;/p&gt;

&lt;p&gt;&lt;img style=&quot;max-width: 560px&quot; src=&quot;https://cloud.githubusercontent.com/assets/979966/10989814/c57074ca-8497-11e5-89cd-73bd78c6d371.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wallaby.js provides AVA tests many super-powers&lt;/strong&gt; of a continuous test runner, including (but not limited to) reporting realtime code coverage and execution results right into your editor, like JetBrains IDEs (such as WebStorm), Visual Studio, Atom, VS Code and Sublime Text.&lt;/p&gt;

&lt;p&gt;AVA itself is pretty fast, but &lt;strong&gt;wallaby is making AVA even faster&lt;/strong&gt; by not only executing affected test files, but &lt;strong&gt;individual affected tests&lt;/strong&gt;. So if you are changing an AVA test or some code covered just by that test, wallaby will only execute that test, not all tests in the test file.&lt;/p&gt;

&lt;p&gt;Configuring AVA in wallaby.js is literally one line in addition to the rest of your wallaby.js configuration file:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;wallaby&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;files&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[...],&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;tests&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[...],&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;testFramework&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'ava'&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If you are using Babel and would like to enable &lt;a href=&quot;https://github.com/power-assert-js/power-assert&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;power-assert&lt;/code&gt;&lt;/a&gt; for AVA, you may configure it as follows:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;wallaby&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;files&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[...],&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;tests&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[...],&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;...&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;testFramework&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'ava'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;

  &lt;span class=&quot;na&quot;&gt;compilers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;'**/*.js'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;wallaby&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;compilers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;babel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;presets&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'es2015'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;plugins&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'babel-plugin-espower/create'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)(&lt;/span&gt;
         &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'babel-core'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;embedAst&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;patterns&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'ava/lib/enhance-assert'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;PATTERNS&lt;/span&gt;
         &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Actually, you may use &lt;a href=&quot;https://github.com/power-assert-js/power-assert&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;power-assert&lt;/code&gt;&lt;/a&gt; with &lt;strong&gt;any testing framework&lt;/strong&gt; that wallaby.js supports. Just need to add &lt;code class=&quot;highlighter-rouge&quot;&gt;babel-plugin-espower&lt;/code&gt; to your babel plugins list.&lt;/p&gt;

&lt;p&gt;One more thing that is worth noting, is that unlike AVA, that forks a separate process per a test file, wallaby.js uses a pool of processes with a configurable capacity and optional process recycling to execute tests. We believe that wallaby.js approach is generally faster, and using a process per file &lt;a href=&quot;https://github.com/sindresorhus/ava/issues/78&quot;&gt;may negatively affect the performance&lt;/a&gt;, especially if you have more than just few test files. Anyway, if you like, you may make wallaby.js to run tests as AVA does by just &lt;a href=&quot;https://wallabyjs.com/docs/config/workers.html&quot;&gt;configuring wallaby to use a large number of processes and to recycle worker processes&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;angular-2-support&quot;&gt;Angular 2 support&lt;/h2&gt;

&lt;p&gt;&lt;img style=&quot;max-width: 180px&quot; class=&quot;right-image&quot; src=&quot;https://wallabyjs.com/assets/img/ng.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Angular 2 release date is approaching&lt;/strong&gt;, and the framework can be used in many different ways: with TypeScript or ES6, System.js or Webpack/Browserify, JSPM or not. No matter what’s your preferred stack, we’d like to make it as easy as possible for you to test your ng2 apps with wallaby.js.&lt;/p&gt;

&lt;p&gt;To help you configuring wallaby.js, we have prepared (and are keeping updated) &lt;a href=&quot;https://wallabyjs.com/docs/integration/angular.html#angular-2&quot;&gt;a few sample projects using Angular 2&lt;/a&gt; with &lt;strong&gt;wallaby.js and various combinations of technologies&lt;/strong&gt; that you may use with it.&lt;/p&gt;

&lt;h2 id=&quot;miscellaneous&quot;&gt;Miscellaneous&lt;/h2&gt;

&lt;p&gt;Don’t get upset if you haven’t found anything interesting for you in the announced features. We are doing &lt;strong&gt;a few releases every week&lt;/strong&gt;, so you are still regularly getting improvements that affect your work with the tool. You may also check out the &lt;a href=&quot;https://github.com/wallabyjs/public/blob/master/CHANGELOG.md&quot;&gt;more detailed list of changes&lt;/a&gt;, below are some notable changes and fixes.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;Function.prototype.bind&lt;/code&gt; polyfill for PhantomJs is now shipped with wallaby.js core, so if you are using some packages as polyfills, you may get rid of them. Note that those polyfills may still be required in you are running PhantomJs tests in Karma.&lt;/li&gt;
  &lt;li&gt;TypeScript 1.8 (and 1.9 dev) support.&lt;/li&gt;
  &lt;li&gt;Ongoing support for Webpack 2 beta changes. Also some significant performance improvements for larger Webpack projects (make sure to update &lt;a href=&quot;https://www.npmjs.com/package/wallaby-webpack&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;wallaby-webpack&lt;/code&gt; package&lt;/a&gt; to latest).&lt;/li&gt;
  &lt;li&gt;Wallaby.js tests indicator for the Distraction Free mode (and Presentation mode) in JetBrains IDEs.&lt;/li&gt;
  &lt;li&gt;Support for the latest versions of Jest and Jasmine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it for the post, thanks for reading!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Wallaby.js - VS Code integration release and Sublime Text integration beta</title>
   <link href="http://dm.glhttp://dm.gl//2016/01/27/wallaby-vscode-sublime/"/>
   <updated>2016-01-27T00:00:00+00:00</updated>
   <id>http://dm.gl/2016/01/27/wallaby-vscode-sublime</id>
   <content type="html">&lt;p&gt;New Year celebrations are over, it’s time to open your editors and start crunching some code. And, of course, tests for the code. Unless you’d like it to become an unmaintainable mess pretty quickly, or just love the Page Refresh Driven development.&lt;/p&gt;

&lt;h2 id=&quot;new-editors&quot;&gt;New editors&lt;/h2&gt;

&lt;h3 id=&quot;vs-code-integration&quot;&gt;VS Code integration&lt;/h3&gt;

&lt;p&gt;First of all, I am happy to announce that today we are officially releasing &lt;a href=&quot;http://wallabyjs.com/docs/intro/get-started-vscode.html&quot;&gt;wallaby.js VS Code integration&lt;/a&gt;. The beta program has been running for a couple of months and the integration have been tested by more than a thousand of our beta users, so we are pretty confident to proceed and start selling &lt;a href=&quot;http://wallabyjs.com/purchase/&quot;&gt;commercial licenses&lt;/a&gt; for it. Make sure to &lt;a href=&quot;https://code.visualstudio.com/Docs/editor/extension-gallery#_update-an-extension&quot;&gt;update the extension&lt;/a&gt; to the latest version to be able to enter your license key.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_inline.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you have tried wallaby.js for VS code, enjoyed it, and now just need to find a good way to convince your management to purchase licenses for the tool - just send your boss the link to this &lt;a href=&quot;http://www.hanselman.com/blog/WallabyJSIsASlickAndPowerfulTestRunnerForJavaScriptInYourIDEOrEditor.aspx&quot;&gt;article by Scott Hanselman&lt;/a&gt;. Scott doesn’t need any introduction, especially if you come from the .NET world.&lt;/p&gt;

&lt;p&gt;By the way, if you are a .NET developer or a company mostly using Microsoft development stack, then &lt;strong&gt;it’s definitely worth considering getting “Freedom” licenses&lt;/strong&gt; to use wallaby.js in VS Code as well as in old good Visual Studio (and a few other editors that we support).&lt;/p&gt;

&lt;p&gt;As usually, we are providing a &lt;a href=&quot;https://gist.github.com/ArtemGovorov/a20a4faa68f584e3ae04&quot;&gt;free license key&lt;/a&gt; to keep using wallaby.js in VS Code for a couple more weeks, while you are making the decision whether to purchase the tool.&lt;/p&gt;

&lt;h3 id=&quot;sublime-text-integration-beta&quot;&gt;Sublime Text integration beta&lt;/h3&gt;

&lt;p&gt;The time has finally come to add &lt;strong&gt;+1000 intelligence to JavaScript code editing in one of the fastest text editors&lt;/strong&gt; out there. Please welcome &lt;a href=&quot;http://wallabyjs.com/docs/intro/get-started-sublime.html&quot;&gt;wallaby.js for Sublime Text editor&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cloud.githubusercontent.com/assets/979966/12608317/3a32105a-c527-11e5-8066-4bfdcc87dd12.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We are planning to run the &lt;strong&gt;beta program for about 2 months&lt;/strong&gt;, so you should have plenty of time to try the tool, even &lt;strong&gt;accomplish a project or two with it while it’s free&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You may get started by &lt;a href=&quot;http://wallabyjs.com/docs/intro/get-started-sublime.html&quot;&gt;reading the tutorial&lt;/a&gt; and, as usually, ask questions and raise issues in &lt;a href=&quot;https://github.com/wallabyjs/public/issues&quot;&gt;our public repository&lt;/a&gt;. Your feedback is very welcome!&lt;/p&gt;

&lt;h2 id=&quot;notable-updates-of-the-last-few-weeks&quot;&gt;Notable updates of the last few weeks&lt;/h2&gt;

&lt;p&gt;Last but not least, I’d like to share a few notes about what we have added/improved recently:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Started simplifying configuration for TypeScript/CoffeeScript/Babel. Now you don’t have to pass &lt;code class=&quot;highlighter-rouge&quot;&gt;babel&lt;/code&gt; or &lt;code class=&quot;highlighter-rouge&quot;&gt;typescript&lt;/code&gt; instance in your configuration options. If wallaby finds the module locally installed, then it will use it. We also have some big plans to &lt;a href=&quot;https://github.com/wallabyjs/public/issues/408&quot;&gt;further simplify wallaby.js configuration process&lt;/a&gt;, your opinion is welcome.&lt;/li&gt;
  &lt;li&gt;Improved assertion data diff in Atom, &lt;a href=&quot;https://twitter.com/wallabyjs/status/692233780610859009&quot;&gt;check it out&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Improved error reporting from PhantomJs, say goodbye to those pesky &lt;code class=&quot;highlighter-rouge&quot;&gt;Parse Error&lt;/code&gt; without stacks.&lt;/li&gt;
  &lt;li&gt;Improved &lt;code class=&quot;highlighter-rouge&quot;&gt;chai&lt;/code&gt; (error stacks) and &lt;code class=&quot;highlighter-rouge&quot;&gt;jasmine&lt;/code&gt; (pending tests) support.&lt;/li&gt;
  &lt;li&gt;Added a few new sample projects, including the &lt;a href=&quot;https://github.com/wallabyjs/angular2-webpack-starter/blob/master/wallaby.js&quot;&gt;Angular2 + Webpack sample&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Improved symlinks resolution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it for the post, thanks for reading!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Wallaby.js - where are we at and where are we going to?</title>
   <link href="http://dm.glhttp://dm.gl//2015/12/11/wallaby-plans/"/>
   <updated>2015-12-11T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/12/11/wallaby-plans</id>
   <content type="html">&lt;p&gt;According to the recent &lt;a href=&quot;https://ponyfoo.com/articles/javascript-developer-survey-results#do-you-write-tests&quot;&gt;JavaScript Developer Survey Results&lt;/a&gt;, &lt;strong&gt;~78% of JavaScript developers write tests and 21.7% don’t write tests&lt;/strong&gt;. It means that we, &lt;a href=&quot;http://wallabyjs.com/&quot;&gt;as a company&lt;/a&gt;, have the great market to keep growing, but still have a lot of work ahead to make JavaScript testing productive, affordable and fun for the rest 21.7%.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/testingpie.png&quot; /&gt;
&lt;em&gt;Do you write tests?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So how exactly are we making the JavaScript testing world better and planning to keep making it better?&lt;/p&gt;

&lt;h2 id=&quot;new-editors&quot;&gt;New editors&lt;/h2&gt;

&lt;h3 id=&quot;vs-code-integration-beta&quot;&gt;VS Code integration beta&lt;/h3&gt;

&lt;p&gt;In case you have missed it, we have recently released the first beta of &lt;a href=&quot;http://wallabyjs.com/docs/intro/get-started-vscode.html&quot;&gt;wallaby.js integration for Visual Studio Code&lt;/a&gt;. If you are using the editor or just planning to try it out, make sure you install wallaby.js extension and enjoy continuous testing in the powerful and streamlined editor.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_inline.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There’re a few things we would like to improve in wallaby.js for Visual Studio Code during the beta period and some of these things require to add new features to the editor, but the great thing is that the editor is now &lt;a href=&quot;https://github.com/Microsoft/vscode/&quot;&gt;open source&lt;/a&gt;, so we can start hacking it and submitting pull requests.&lt;/p&gt;

&lt;h3 id=&quot;sublime-text-integration-eta&quot;&gt;Sublime Text integration ETA&lt;/h3&gt;

&lt;p&gt;We have been approaching and prototyping it for the last few months, but, unlike JavaScript/TypeScript/CoffeeScript/Java/C#, Python and its ecosystem wasn’t something that we’ve had much experience with, so extending Sublime Text was going slower than we’d like it to go.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/sublime_text_icon.png&quot; class=&quot;right-image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To speed things up, we have decided to &lt;strong&gt;expand our team and have hired a professional Python developer&lt;/strong&gt;. I’m happy to share that we have &lt;a href=&quot;https://www.youtube.com/watch?v=xng_ymsnJks&quot;&gt;made some significant progress&lt;/a&gt;, and also happy to announce that &lt;strong&gt;we are planning to release the first beta version of wallaby.js for Sublime Text in the next 2 months&lt;/strong&gt;.&lt;/p&gt;

&lt;h2 id=&quot;strategic-results-and-plans&quot;&gt;Strategic results and plans&lt;/h2&gt;

&lt;p&gt;For the last few months we have been &lt;strong&gt;expanding both vertically&lt;/strong&gt; by adding new features and &lt;strong&gt;horizontally&lt;/strong&gt; by supporting more editors.&lt;/p&gt;

&lt;p&gt;During just over &lt;strong&gt;10 months&lt;/strong&gt;, we have released wallaby.js &lt;strong&gt;240 times&lt;/strong&gt;. It’s &lt;strong&gt;4 live updates with new features and bug fixes during every 5 days&lt;/strong&gt;. Apart from being a great way to deliver you the wallaby awesomeness fast and easy, frequent releases and hassle-free automatic updates is also our way to embrace the ever changing chaos of the JavaScript ecosystem.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vertical.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The tool had grown from supporting only &lt;strong&gt;JetBrains IDEs initially to support Visual Studio, Atom, VS Code, and now we are working on Sublime Text 3&lt;/strong&gt;. Adding the support of these &lt;strong&gt;4 different editors&lt;/strong&gt; (with the fifth on the way) within the 10 months time frame was a great way to bring wallaby.js to as many JavaScript developers as possible.&lt;/p&gt;

&lt;p&gt;While we know that there’re more editors out there, we would like to take a break from adding more editor integrations and shift our &lt;strong&gt;focus on growing the product vertically&lt;/strong&gt;. Apart from working on a few already requested features, like the &lt;a href=&quot;https://github.com/wallabyjs/public/issues/144&quot;&gt;test explorer&lt;/a&gt;, &lt;a href=&quot;https://github.com/wallabyjs/public/issues/38&quot;&gt;code coverage reports&lt;/a&gt;, and adding &lt;a href=&quot;https://github.com/wallabyjs/public/issues/29&quot;&gt;more test runners&lt;/a&gt; (such as Chrome and Electron), we are also planning to start working on &lt;strong&gt;a couple of truly amazing and innovative new features&lt;/strong&gt; that will boost your productivity even further, so &lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;stay tuned&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;notable-updates-of-the-last-few-weeks&quot;&gt;Notable updates of the last few weeks&lt;/h2&gt;

&lt;p&gt;To conclude, I’d like to share a few notes about what we have added/improved recently:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://wallabyjs.com/docs/integration/overview.html#supported-testing-frameworks&quot;&gt;Jasmine for Node&lt;/a&gt; support was added.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://wallabyjs.com/docs/integration/es-next.html&quot;&gt;Babel 6 support&lt;/a&gt; was added. All of the samples were update to include comments how to configure wallaby.js to use it.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://blogs.msdn.com/b/typescript/archive/2015/11/30/announcing-typescript-1-7.aspx&quot;&gt;TypeScript 1.7&lt;/a&gt; support was added.&lt;/li&gt;
  &lt;li&gt;Webpack 2 (beta) support was added to the latest &lt;a href=&quot;https://www.npmjs.com/package/wallaby-webpack&quot;&gt;wallaby-webpack package version&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Have added &lt;a href=&quot;http://wallabyjs.com/docs/integration/systemjs.html&quot;&gt;the documentation page and more samples for system.js&lt;/a&gt;. Make sure to have a look to see how to configure wallaby.js inline test error reporting for Angular 2, Aurelia and other system.js based projects.&lt;/li&gt;
  &lt;li&gt;We have finally added &lt;a href=&quot;https://github.com/wallabyjs/public/issues/69&quot;&gt;support for advanced glob patterns&lt;/a&gt; to JetBrains IDEs integration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it for the post, thanks for reading and Happy Holidays!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Wallaby.js for Visual Studio Code</title>
   <link href="http://dm.glhttp://dm.gl//2015/11/26/wallaby-for-visual-studio-code/"/>
   <updated>2015-11-26T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/11/26/wallaby-for-visual-studio-code</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://wallabyjs.com/&quot;&gt;Wallaby.js&lt;/a&gt; is a &lt;strong&gt;continuous test runner for JavaScript&lt;/strong&gt;. It solves the &lt;strong&gt;fundamental issue of being able to provide an instant feedback from your tests as you write your code, no matter how large your codebase is&lt;/strong&gt;. Wallaby.js uses smart dependency analysis to only execute tests affected by your code changes and leverages parallel test execution.&lt;/p&gt;

&lt;p&gt;It also displays test execution results, &lt;strong&gt;including code coverage, right in your code editor&lt;/strong&gt;. No context switching, no need to switch to browser - it’s &lt;strong&gt;game changing&lt;/strong&gt;. The tool pays for itself very quickly and is bringing you to a whole new productivity level.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When wallaby.js was released early this year, it was supporting only IntelliJ platform IDEs, such as &lt;a href=&quot;http://wallabyjs.com/docs/intro/get-started-jetbrains.html&quot;&gt;WebStorm and IntelliJ IDEA&lt;/a&gt;, a few months ago we have added &lt;a href=&quot;http://wallabyjs.com/docs/intro/get-started-vs.html&quot;&gt;Visual Studio&lt;/a&gt; and &lt;a href=&quot;http://wallabyjs.com/docs/intro/get-started-atom.html&quot;&gt;Atom editor&lt;/a&gt; support.&lt;/p&gt;

&lt;p&gt;Now it’s time to bring the &lt;strong&gt;awesomeness of wallaby to &lt;a href=&quot;https://code.visualstudio.com/&quot;&gt;Visual Studio Code&lt;/a&gt; editor&lt;/strong&gt;. The streamlined and powerful editor plus the power of wallaby.js is a great combo to deal with JavaScript and TypeScript projects of any size fast and easy.&lt;/p&gt;

&lt;h2 id=&quot;setting-up&quot;&gt;Setting up&lt;/h2&gt;

&lt;p&gt;Wallaby.js for Visual Studio Code consists of two separately versioned parts: wallaby.js Extension and wallaby.js Core.
To get started, you need to install &lt;a href=&quot;https://marketplace.visualstudio.com/items/WallabyJs.wallaby-vscode&quot;&gt;Wallaby.js Extension&lt;/a&gt; from your editor (using &lt;code class=&quot;highlighter-rouge&quot;&gt;Extensions: Install Extension&lt;/code&gt; command).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_install.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After the extension is installed, wallaby.js Core will be automatically downloaded and installed. Please note, that &lt;strong&gt;the very first time&lt;/strong&gt; wallaby.js needs to download and install its dependencies, so it may take a &lt;strong&gt;minute or two&lt;/strong&gt;. Further updates are much faster. The notification is displayed when the installation is finished.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_notify.png&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;sample-code&quot;&gt;Sample code&lt;/h3&gt;

&lt;p&gt;For this tutorial I will use &lt;a href=&quot;https://github.com/wallabyjs/calculator-sample&quot;&gt;this sample calculator repository&lt;/a&gt;. You can clone it to try locally:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/wallabyjs/calculator-sample.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Once you have the source code locally, open the project folder in Visual Studio Code.&lt;/p&gt;

&lt;p&gt;There you will find a simple calculator project there with wallaby.js configuration file. Wallaby &lt;a href=&quot;http://wallabyjs.com/docs/config/overview.html&quot;&gt;configuration file is a simple JSON or JavaScript file&lt;/a&gt; in your project root folder with just a couple of mandatory settings. The configuration file includes a list of &lt;a href=&quot;http://wallabyjs.com/docs/config/files.html&quot;&gt;files and tests&lt;/a&gt; of your application as well as some settings for various technologies that you may be using to build your project, such as &lt;a href=&quot;http://wallabyjs.com/docs/integration/webpack.html&quot;&gt;Webpack&lt;/a&gt; or &lt;a href=&quot;http://wallabyjs.com/docs/integration/browserify.html&quot;&gt;Browserify&lt;/a&gt; configuration &lt;a href=&quot;http://wallabyjs.com/docs/integration/es-next.html&quot;&gt;Babel&lt;/a&gt;/&lt;a href=&quot;http://wallabyjs.com/docs/integration/coffeescript.html&quot;&gt;CoffeeScript&lt;/a&gt;/&lt;a href=&quot;http://wallabyjs.com/docs/integration/typescript.html&quot;&gt;TypeScript&lt;/a&gt; compiler options, etc.&lt;/p&gt;

&lt;p&gt;Wallaby supports lots of technologies and scenarios, we have &lt;a href=&quot;http://wallabyjs.com/docs/integration/overview.html#sample-projects-with-wallaby-js-config-and-other-wallaby-js-recipes&quot;&gt;collection of sample projects with configuration files&lt;/a&gt; for different tools, frameworks and languages, such as &lt;strong&gt;Webpack, Browserify, ES6 and ES7 via Babel, TypeScript and CoffeeScript, React and Angular, node.js and io.js, etc&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/tech.png&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;first-steps&quot;&gt;First steps&lt;/h2&gt;

&lt;h3 id=&quot;selecting-wallabyjs-config-file&quot;&gt;Selecting wallaby.js config file&lt;/h3&gt;

&lt;p&gt;Wallaby.js for Visual Studio Code needs to know what configuration file to use to run your tests. If you only have one file named &lt;code class=&quot;highlighter-rouge&quot;&gt;wallaby.js&lt;/code&gt;/&lt;code class=&quot;highlighter-rouge&quot;&gt;wallaby.conf.js&lt;/code&gt; or &lt;code class=&quot;highlighter-rouge&quot;&gt;wallaby.json&lt;/code&gt; in your project root, &lt;strong&gt;wallaby will automatically select it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;However, if you have multiple configuration files, use different naming convention or have the config file not in the root folder, you may select the config file using &lt;code class=&quot;highlighter-rouge&quot;&gt;Wallaby.js: Select Configuration File&lt;/code&gt; command from the editor Command Palette.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_config.png&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;wallabyjs-command-palette&quot;&gt;Wallaby.js Command Palette&lt;/h3&gt;
&lt;p&gt;As you probably know, you may press &lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl/Cmd + Shift + P&lt;/code&gt; in Visual Studio Code to get the editor Command Palette in case if you’ve forgotten some shortcuts or just like invoking commands this way. There you may search for &lt;code class=&quot;highlighter-rouge&quot;&gt;wallaby&lt;/code&gt; and use the found commands.&lt;/p&gt;

&lt;p&gt;Also, for your convenience wallaby.js &lt;strong&gt;adds its own Command Palette&lt;/strong&gt; to the editor that you may display by pressing &lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl/Cmd + Shift + =&lt;/code&gt;. It’s a &lt;strong&gt;fast and easy&lt;/strong&gt; way to quickly use various wallaby features.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_commands.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now let’s have some fun.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s try starting wallaby.js: to do that you need to invoke wallaby &lt;code class=&quot;highlighter-rouge&quot;&gt;Start&lt;/code&gt; command. You may do it by using the &lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl/Cmd + Shift + R, R&lt;/code&gt; shortcut, or using wallaby Command Palette.&lt;/p&gt;

&lt;p&gt;To stop wallaby.js, you may use the &lt;code class=&quot;highlighter-rouge&quot;&gt;Stop&lt;/code&gt; command.&lt;/p&gt;

&lt;h2 id=&quot;wallabyjs-in-action&quot;&gt;Wallaby.js in action&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_status.png&quot; class=&quot;right-image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once you have started wallaby.js, at the bottom left corner of the editor you’ll see wallaby status indicator. It’s job is pretty simple: when it displays a spinner - your tests are running, when it shows a cross - you have some failing tests, when it shows a tick - all of your tests are passing. It also shows the number of failing or passing tests,  and &lt;strong&gt;you may also use the indicator to show ‘Wallaby.js Tests’ Output Channel by clicking it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now, let’s open the sample calculator project spec (&lt;code class=&quot;highlighter-rouge&quot;&gt;test/calculatorSpec.js&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;When wallaby.js is running, you can see the code coverage in opened source files (specified in wallaby configuration file). As you can see, there are various colored squares displayed for each line of your source code.&lt;/p&gt;

&lt;p&gt;Try jumping to any of the passing tests and break it, for example try changing the 2 plus 2 expectation result to 5 in the &lt;code class=&quot;highlighter-rouge&quot;&gt;should add numbers&lt;/code&gt; test, or try breaking the code covered by the test. Right after the change wallaby.js automatically runs your tests and displays the result in status bar.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_inline.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The code coverage and messages are automatically updated, just as you type&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Also, try editing some &lt;code class=&quot;highlighter-rouge&quot;&gt;console.log&lt;/code&gt; arguments or just &lt;code class=&quot;highlighter-rouge&quot;&gt;console.log&lt;/code&gt; any object you like.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_console.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This is a great way to quickly inspect any objects without having to leave your editor, without switching to any other console. Think how cool it is - &lt;strong&gt;your code editor is your console with all the required context.&lt;/strong&gt;&lt;/p&gt;

&lt;h3 id=&quot;coverage-indicators&quot;&gt;Coverage indicators&lt;/h3&gt;

&lt;p&gt;Let’s have a look at the editor gutter where you may see some indicators. Here is what these coverage indicators mean:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Gray square means that the source line is not covered by any of your tests.&lt;/li&gt;
  &lt;li&gt;Green square means that the source line is covered by at least one of your tests.&lt;/li&gt;
  &lt;li&gt;Yellow square means that the source line is only partially covered by some of your tests.&lt;/li&gt;
  &lt;li&gt;Red square means that the source line is the source of an error or failed expectation, or is in the stack of an error.&lt;/li&gt;
  &lt;li&gt;Pink square means that the source line is on the execution path of a failing test.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;failing-tests&quot;&gt;Failing tests&lt;/h3&gt;

&lt;p&gt;‘Wallaby.js Tests’ Output Channel displays all tests that are currently failing along with the error stacks and registered console.log calls. Some bits of the displayed information are hyperlinks so you can navigate to different places, for example to the exact error line, or a line where something is logged to console. To quickly focus the panel you may use the &lt;code class=&quot;highlighter-rouge&quot;&gt;Show Failing Tests&lt;/code&gt; wallaby command (&lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl/Cmd + Shift + R, T&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_failing.png&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;commands&quot;&gt;Commands&lt;/h2&gt;

&lt;p&gt;To help you writing/navigating your code and tests more efficiently, wallaby.js provides a few commands. You may see the full list in the wallaby.js Command Palette (&lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl/Cmd + Shift + =&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;These commands include:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Show line tests&lt;/strong&gt;: displays the line related test data. The command allows you to quickly view all tests (&lt;strong&gt;both failing and passing&lt;/strong&gt;) that cover the current line of code, navigate to test and code errors, view console messages related to some specific test or some source code line.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_line_tests.gif&quot; style=&quot;margin-left: 40px&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Jump to failing test&lt;/strong&gt;: allows to quickly navigate to the failing test from any ‘pink’ context (the failing test execution path).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Jump to error source&lt;/strong&gt;: allows to quickly navigate to the source of the test error from any ‘pink’ context (failing test execution path).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Toggle uncovered regions&lt;/strong&gt;: displays/hides uncovered regions for an opened file. The command is very useful for ‘yellow’ lines to display what is exactly not covered in the line. Highlighted markers will automatically disappear when you start editing your code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_coverage_indicators.png&quot; style=&quot;margin-left: 40px&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Run line tests&lt;/strong&gt;: the command is pretty simple, it just runs a single test (if invoked from within the test) or all related tests (if invoked within some source code covered by the tests).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Run file tests&lt;/strong&gt;: the command runs all tests within the test file it is invoked in, or all tests in all the test files that cover the source file that the command is invoked within.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Run project tests&lt;/strong&gt;: the command runs all project tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;/h2&gt;

&lt;p&gt;If you encounter any issues with configuring or using wallaby.js and not sure why it happens, check out our &lt;a href=&quot;http://wallabyjs.com/docs/intro/troubleshooting.html&quot;&gt;troubleshooting docs section&lt;/a&gt; or search our &lt;a href=&quot;https://github.com/wallabyjs/public/issues&quot;&gt;public repository issues&lt;/a&gt; to see if someone else have been experiencing something similar.&lt;/p&gt;

&lt;p&gt;Another useful technique is to run wallaby.js &lt;a href=&quot;http://wallabyjs.com/docs/intro/troubleshooting.html#more-debug-information&quot;&gt;with the &lt;code class=&quot;highlighter-rouge&quot;&gt;debug&lt;/code&gt; flag set to &lt;code class=&quot;highlighter-rouge&quot;&gt;true&lt;/code&gt;&lt;/a&gt;. In this case wallaby outputs a lot of additional information about the test execution progress which may help you to understand what’s going on if something goes wrong. The output can be viewed in the Wallaby.js Console Output Channel.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vsc_console.png&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;more-information&quot;&gt;More information&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;Follow us on twitter&lt;/a&gt; and &lt;a href=&quot;http://wallabyjs.com/#subscribe&quot;&gt;subscribe to our newsletter&lt;/a&gt; to stay updated.&lt;/li&gt;
  &lt;li&gt;Browse our &lt;a href=&quot;http://wallabyjs.com/docs&quot;&gt;full documentation&lt;/a&gt;, &lt;a href=&quot;https://github.com/wallabyjs/public/issues&quot;&gt;ask questions or create issues&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Check out &lt;a href=&quot;http://wallabyjs.com/purchase&quot;&gt;wallaby.js planned pricing for Visual Studio Code&lt;/a&gt; to get an idea how much it’ll cost after the beta period ends.&lt;/li&gt;
  &lt;li&gt;Consider getting yourself a copy of &lt;a href=&quot;http://wallabyjs.com/purchase&quot;&gt;‘Freedom’ license&lt;/a&gt; today to help the project and &lt;strong&gt;be able to use wallaby.js in any editor that &lt;a href=&quot;http://wallabyjs.com/#download&quot;&gt;we support today&lt;/a&gt; and will support in future&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Wallaby.js for Atom text editor</title>
   <link href="http://dm.glhttp://dm.gl//2015/08/31/wallaby-for-atom/"/>
   <updated>2015-08-31T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/08/31/wallaby-for-atom</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://wallabyjs.com/&quot;&gt;Wallaby.js&lt;/a&gt; is a &lt;strong&gt;continuous test runner for JavaScript&lt;/strong&gt;. It solves the &lt;strong&gt;fundamental issue of being able to provide an instant feedback from your tests as you write your code, no matter how large your codebase is&lt;/strong&gt;. Wallaby.js uses smart dependency analysis to only execute tests affected by your code changes and leverages parallel test execution.&lt;/p&gt;

&lt;p&gt;It also displays test execution results, &lt;strong&gt;including code coverage, right in your code editor&lt;/strong&gt;. No context switching, no need to switch to browser - it’s game changing. The tool pays for itself very quickly and is bringing you to a whole new productivity level.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When wallaby.js was released early this year, it was supporting only IntelliJ platform IDEs, such as WebStorm and IntelliJ IDEA, a few months ago we have added Visual Studio support. Now it’s time to bring the &lt;strong&gt;awesomeness of wallaby to Atom text editor&lt;/strong&gt;. The lightweight and elegant editor plus the power of wallaby.js is a great combo to deal with JavaScript projects of any size fast and easy.&lt;/p&gt;

&lt;h2 id=&quot;setting-up&quot;&gt;Setting up&lt;/h2&gt;

&lt;p&gt;Wallaby.js for Atom consists of three separately versioned parts: Atom Package, wallaby.js Plugin and wallaby.js Core.
To get started, you need to install &lt;a href=&quot;https://atom.io/packages/atom-wallaby&quot;&gt;wallaby.js Atom package&lt;/a&gt; from your editor (&lt;code class=&quot;highlighter-rouge&quot;&gt;Settings - Install&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_install.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After the package is installed, wallaby.js Plugin and wallaby.js Core will be automatically downloaded and installed. The &lt;strong&gt;Atom package is just a loader/updater of wallaby.js Plugin and Core&lt;/strong&gt;, it gets updated quite infrequently and does it the same way as all other Atom packages that you may have installed.&lt;/p&gt;

&lt;p&gt;Wallaby.js Plugin and wallaby.js Core on the other hand are updated more frequently, the update is performed automatically behind the scenes and the notification is displayed when the update is finished.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_notify.png&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;sample-code&quot;&gt;Sample code&lt;/h3&gt;

&lt;p&gt;For this tutorial I will use &lt;a href=&quot;https://github.com/wallabyjs/calculator-sample&quot;&gt;this sample calculator repository&lt;/a&gt;. You can clone it to try locally:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/wallabyjs/calculator-sample.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Once you have the source code locally, open the project folder in Atom.&lt;/p&gt;

&lt;p&gt;There you will find a simple calculator project there with wallaby.js configuration file. Wallaby &lt;a href=&quot;http://wallabyjs.com/docs/config/overview.html&quot;&gt;configuration file is a simple JSON or JavaScript file&lt;/a&gt; in your project root folder with just a couple of mandatory settings. The configuration file includes a list of &lt;a href=&quot;http://wallabyjs.com/docs/config/files.html&quot;&gt;files and tests&lt;/a&gt; of your application as well as some settings for various technologies that you may be using to build your project, such as &lt;a href=&quot;http://wallabyjs.com/docs/integration/webpack.html&quot;&gt;Webpack&lt;/a&gt; or &lt;a href=&quot;http://wallabyjs.com/docs/integration/browserify.html&quot;&gt;Browserify&lt;/a&gt; configuration &lt;a href=&quot;http://wallabyjs.com/docs/integration/es-next.html&quot;&gt;Babel&lt;/a&gt;/&lt;a href=&quot;http://wallabyjs.com/docs/integration/coffeescript.html&quot;&gt;CoffeeScript&lt;/a&gt;/&lt;a href=&quot;http://wallabyjs.com/docs/integration/typescript.html&quot;&gt;TypeScript&lt;/a&gt; compiler options, etc.&lt;/p&gt;

&lt;p&gt;Wallaby supports lots of technologies and scenarios, we have &lt;a href=&quot;http://wallabyjs.com/docs/integration/overview.html#sample-projects-with-wallaby-js-config-and-other-wallaby-js-recipes&quot;&gt;collection of sample projects with configuration files&lt;/a&gt; for different tools, frameworks and languages, such as &lt;strong&gt;Webpack, Browserify, ES6 and ES7 via Babel, TypeScript and CoffeeScript, React and Angular, node.js and io.js, etc&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/tech.png&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;first-steps&quot;&gt;First steps&lt;/h2&gt;

&lt;h3 id=&quot;selecting-wallabyjs-config-file&quot;&gt;Selecting wallaby.js config file&lt;/h3&gt;

&lt;p&gt;Wallaby.js for Atom needs to know what configuration file to use to run your tests. If you only have one file named &lt;code class=&quot;highlighter-rouge&quot;&gt;wallaby.js&lt;/code&gt;/&lt;code class=&quot;highlighter-rouge&quot;&gt;wallaby.conf.js&lt;/code&gt; or &lt;code class=&quot;highlighter-rouge&quot;&gt;wallaby.json&lt;/code&gt; in your project root, &lt;strong&gt;wallaby will automatically select it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;However, if you have multiple configuration files, use different naming convention or have the config file not in the root folder, you may select the config file from the Tree View with context menu or by opening the config in an editor tab and using &lt;code class=&quot;highlighter-rouge&quot;&gt;Select as Wallaby.js Config&lt;/code&gt; context menu item.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_config.png&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;wallabyjs-command-palette&quot;&gt;Wallaby.js Command Palette&lt;/h3&gt;
&lt;p&gt;As you probably know, you may press &lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl/Cmd + Shift + P&lt;/code&gt; in Atom to get the editor Command Palette in case if you’ve forgotten some shortcuts or just like invoking commands this way. There you may search for &lt;code class=&quot;highlighter-rouge&quot;&gt;wallaby&lt;/code&gt; and use the found commands.&lt;/p&gt;

&lt;p&gt;Also, for your convenience wallaby.js &lt;strong&gt;adds its own Command Palette to Atom&lt;/strong&gt; that you may display by pressing &lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl/Cmd + Shift + Space&lt;/code&gt;. It’s a &lt;strong&gt;fast and easy&lt;/strong&gt; way to quickly use various wallaby features.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_commands.png&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;wallabyjs-panel&quot;&gt;Wallaby.js Panel&lt;/h3&gt;

&lt;p&gt;One of the things you’ll be using a lot is wallaby.js Panel. It displays the name of the selected config file, failing test results as well as some test stats. You can open and collapse it by using the corresponding command (from the palette or via &lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl/Cmd + Shift + T, T&lt;/code&gt; shortcut).&lt;/p&gt;

&lt;p&gt;Let’s try starting wallaby.js: to do that you need to invoke wallaby &lt;code class=&quot;highlighter-rouge&quot;&gt;Start&lt;/code&gt; command. You may do it by using the &lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl/Cmd + Shift + T, R&lt;/code&gt; shortcut, or using wallaby Command Palette, or by clicking &lt;code class=&quot;highlighter-rouge&quot;&gt;Start&lt;/code&gt; button on the wallaby.js Panel.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_start.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To stop wallaby.js, you may use &lt;code class=&quot;highlighter-rouge&quot;&gt;Stop&lt;/code&gt; command or &lt;code class=&quot;highlighter-rouge&quot;&gt;Stop&lt;/code&gt; button on the wallaby.js Panel.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now let’s have some fun.&lt;/strong&gt;&lt;/p&gt;

&lt;h2 id=&quot;wallabyjs-in-action&quot;&gt;Wallaby.js in action&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_status.png&quot; class=&quot;right-image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once you have started wallaby.js, at the bottom right corner of the editor you’ll see wallaby status indicator. It’s job is pretty simple: when it displays a spinner - your tests are running, when it’s red - you have some failing tests, when it’s green - all of your tests are passing. &lt;strong&gt;You may also use the indicator to toggle wallaby.js Panel by clicking it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now, let’s open the sample calculator project spec (&lt;code class=&quot;highlighter-rouge&quot;&gt;test/calculatorSpec.js&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;When wallaby.js is running, you can see the code coverage in opened source files (specified in wallaby configuration file). As you can see, there are various colored squares displayed for each line of your source code.&lt;/p&gt;

&lt;p&gt;Try jumping to any of the passing tests and break it, for example try changing the 2 plus 2 expectation result to 5 in the &lt;code class=&quot;highlighter-rouge&quot;&gt;should add numbers&lt;/code&gt; test, or try breaking the code covered by the test. Right after the change wallaby.js automatically runs your tests and displays the result in Atom, right where you need to see it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_inline.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The code coverage and inline messages are automatically updated, just as you type&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Also, try editing some &lt;code class=&quot;highlighter-rouge&quot;&gt;console.log&lt;/code&gt; arguments or just &lt;code class=&quot;highlighter-rouge&quot;&gt;console.log&lt;/code&gt; any object you like.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_console.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This is a great way to quickly inspect any objects without having to leave your editor, without switching to any other console. Think how cool it is - &lt;strong&gt;your code editor is your console with all the required context.&lt;/strong&gt;&lt;/p&gt;

&lt;h3 id=&quot;coverage-indicators&quot;&gt;Coverage indicators&lt;/h3&gt;

&lt;p&gt;Let’s have a look at the editor gutter where you may see some indicators. Here is what these coverage indicators mean:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Gray square means that the source line is not covered by any of your tests.&lt;/li&gt;
  &lt;li&gt;Green square means that the source line is covered by at least one of your tests.&lt;/li&gt;
  &lt;li&gt;Yellow square means that the source line is only partially covered by some of your tests.&lt;/li&gt;
  &lt;li&gt;Red square means that the source line is the source of an error or failed expectation, or is in the stack of an error.&lt;/li&gt;
  &lt;li&gt;Pink square means that the source line is on the execution path of a failing test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any indicator click triggers &lt;code class=&quot;highlighter-rouge&quot;&gt;Show line tests&lt;/code&gt; command which we will review later.&lt;/p&gt;

&lt;h3 id=&quot;failing-tests&quot;&gt;Failing tests&lt;/h3&gt;

&lt;p&gt;Wallaby.js Panel displays all tests that are currently failing along with the error stacks and registered console.log calls. Some bits of the displayed information are hyperlinks that you can use with your mouse or keyboard (&lt;code class=&quot;highlighter-rouge&quot;&gt;Enter&lt;/code&gt;) to navigate to different places, for example to the exact error line, or a failing test, or a place where something is logged to console. To quickly focus the panel you may use the &lt;code class=&quot;highlighter-rouge&quot;&gt;Focus Panel&lt;/code&gt; wallaby command (&lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl + 1&lt;/code&gt;), pressing &lt;code class=&quot;highlighter-rouge&quot;&gt;Esc&lt;/code&gt; will return the focus back to the editor.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_panel.png&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;commands&quot;&gt;Commands&lt;/h2&gt;

&lt;p&gt;To help you writing/navigating your code and tests more efficiently, wallaby.js provides a few commands. You may see the full list in the wallaby.js Command Palette (&lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl/Cmd + Shift + Space&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;These commands include:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Show line tests&lt;/strong&gt;: displays the line related test data. The command allows you to quickly view all tests (&lt;strong&gt;both failing and passing&lt;/strong&gt;) that cover the current line of code, navigate to test and code errors, view console messages related to some specific test or some source code line.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_line_tests.gif&quot; style=&quot;margin-left: 40px&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Jump to failing test&lt;/strong&gt;: allows to quickly navigate to the failing test from any ‘pink’ context (the failing test execution path).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Jump to error source&lt;/strong&gt;: allows to quickly navigate to the source of the test error from any ‘pink’ context (failing test execution path).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Toggle uncovered regions&lt;/strong&gt;: displays/hides uncovered regions for an opened file. The command is very useful for ‘yellow’ lines to display what is exactly not covered in the line. Highlighted markers will automatically disappear when you start editing your code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_coverage_indicators.png&quot; style=&quot;margin-left: 40px&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Run line tests&lt;/strong&gt;: the command is pretty simple, it just runs a single test (if invoked from within the test) or all related tests (if invoked within some source code covered by the tests).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Run file tests&lt;/strong&gt;: the command runs all tests within the test file it is invoked in, or all tests in all the test files that cover the source file that the command is invoked within.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Run project tests&lt;/strong&gt;: the command runs all project tests.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Show last run screen shot&lt;/strong&gt;: the command just does what it says. After every test run, wallaby.js captures a screen shot of the generated test runner page, so if you have some tests that are displaying anything - the command could be useful for you. Very powerful combo is using the command together with the &lt;code class=&quot;highlighter-rouge&quot;&gt;Run line tests&lt;/code&gt; - you run a specific test, then view the screen shot for the test. Please note that you may often have some ‘tear down’ code, that clears the DOM before or after each test - wallaby.js is smart enough to capture the screenshot before the tear down code. Atom automatically updates the screen shot file when it’s changed, that allows you to have ‘live’ preview right in your editor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_screen.gif&quot; style=&quot;margin-left: 40px&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;/h2&gt;

&lt;p&gt;If you encounter any issues with configuring or using wallaby.js and not sure why it happens, check out our &lt;a href=&quot;http://wallabyjs.com/docs/intro/troubleshooting.html&quot;&gt;troubleshooting docs section&lt;/a&gt; or search our &lt;a href=&quot;https://github.com/wallabyjs/public/issues&quot;&gt;public repository issues&lt;/a&gt; to see if someone else have been experiencing something similar.&lt;/p&gt;

&lt;p&gt;Another useful technique is to run wallaby.js &lt;a href=&quot;http://wallabyjs.com/docs/intro/troubleshooting.html#more-debug-information&quot;&gt;with the &lt;code class=&quot;highlighter-rouge&quot;&gt;debug&lt;/code&gt; flag set to &lt;code class=&quot;highlighter-rouge&quot;&gt;true&lt;/code&gt;&lt;/a&gt;. In this case wallaby outputs a lot of additional information about the test execution progress which may help you to understand what’s going on if something goes wrong. The output can be viewed in the Developer Tools Console (&lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl/Cmd + Alt + I&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/atom_devtools.png&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;more-information&quot;&gt;More information&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;Follow us on twitter&lt;/a&gt; and &lt;a href=&quot;http://wallabyjs.com/#subscribe&quot;&gt;subscribe to our newsletter&lt;/a&gt; to stay updated.&lt;/li&gt;
  &lt;li&gt;Browse our &lt;a href=&quot;http://wallabyjs.com/docs&quot;&gt;full documentation&lt;/a&gt;, &lt;a href=&quot;https://github.com/wallabyjs/public/issues&quot;&gt;ask questions or create issues&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Check out &lt;a href=&quot;http://wallabyjs.com/purchase&quot;&gt;wallaby.js planned pricing for Atom&lt;/a&gt; to get an idea how much it’ll cost after the beta period  ends.&lt;/li&gt;
  &lt;li&gt;Consider getting yourself a copy of &lt;a href=&quot;http://wallabyjs.com/purchase&quot;&gt;‘Freedom’ license&lt;/a&gt; today to help the project and &lt;strong&gt;be able to use wallaby.js in any editor that &lt;a href=&quot;http://wallabyjs.com/#download&quot;&gt;we support today&lt;/a&gt; and will support in future&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>The Holy Grail of JavaScript Testing</title>
   <link href="http://dm.glhttp://dm.gl//2015/06/29/holy-grail-of-javascript-testing/"/>
   <updated>2015-06-29T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/06/29/holy-grail-of-javascript-testing</id>
   <content type="html">&lt;p&gt;My last blog post was &lt;a href=&quot;http://dm.gl/2015/05/29/heroes-of-javascript-and-testing/&quot;&gt;about mighty knights&lt;/a&gt; of JavaScript testing, today it’s turn of the Holy Grail of JavaScript Testing.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/montypython.jpg&quot; alt=&quot;knights&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So I was &lt;a href=&quot;https://egghead.io/lessons/react-unit-testing-a-react-component-using-jasmine-and-webpack&quot;&gt;watching this video&lt;/a&gt; the other day, and while the purpose of the video is to demonstrate how to set things up and get started, the end of it really reminded me about the pain I had to experience before I created &lt;a href=&quot;http://wallabyjs.com/&quot;&gt;wallaby.js&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you watch the last minute of the video (from 3:14), you’ll surely notice that&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;to accomplish one simple task of writing a test, the author had to &lt;strong&gt;switch context several times&lt;/strong&gt; between three different applications - terminal, code editor and browser test page;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;code coverage is missing&lt;/strong&gt; (and when present, may add the fourth application to keep switching to);&lt;/li&gt;
  &lt;li&gt;larger application will take &lt;strong&gt;a few seconds to build and a few more to run&lt;/strong&gt; your tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course, there are a few solutions that may get you closer to a better workflow, such as a file watcher via gulp or grunt, karma with webpack plugin, etc. I have previously spent many hours trying to get closer to what I think the modern productive automated testing workflow should look like.&lt;/p&gt;

&lt;p&gt;And I failed. There are just &lt;strong&gt;too many moving parts to stitch together&lt;/strong&gt; - even if or when it all works, the whole thing is &lt;strong&gt;far from satisfying my list of requirements&lt;/strong&gt;. It’s like trying to build something from a pile of LEGO bricks with a few non-matching and few missing bits and pieces.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/lego_grail.jpg&quot; alt=&quot;lego&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Don’t get me wrong. I love small tools, when each one is doing one thing well. It’s nice to be able to choose a testing framework, a module bundler, language dialect, a transpiler, an application framework, a code editor, etc., as opposed to be forced to use a monolith from a single vendor.&lt;/p&gt;

&lt;p&gt;But once I’m happy about each and every part, I want them to &lt;strong&gt;work together smoothly&lt;/strong&gt;. When I write my code with tests, I’m doing just one thing - &lt;strong&gt;I am writing my code with tests&lt;/strong&gt;. So I need a &lt;strong&gt;tool that would allow me to to do this one thing well&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Also, to be fair, my expectations for the &lt;strong&gt;modern and productive&lt;/strong&gt; testing workflow are pretty high. I sometimes do JavaScript TDD, sometimes I am using some mixed approach where I write some of my code first, but either way:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;I’m &lt;strong&gt;too lazy to save files&lt;/strong&gt; to run my tests. Code changes should be enough as a trigger.&lt;/li&gt;
  &lt;li&gt;I &lt;strong&gt;don’t want to wait too much&lt;/strong&gt; for my tests to finish running. Running the whole suite when a single test or file changes just doesn’t cut anymore.&lt;/li&gt;
  &lt;li&gt;I &lt;strong&gt;don’t like to leave my code editor&lt;/strong&gt; to see the feedback from my tests. Hate apps/context switching. Docked tool windows or a console/terminal/browser next to my code editor - are still distracting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/grail.jpg&quot; class=&quot;right-image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For those of you who write tests, everything I have listed probably sounds like &lt;strong&gt;the Holy Grail of JavaScript Testing&lt;/strong&gt;, doesn’t it? Well, &lt;a href=&quot;http://wallabyjs.com/docs/&quot;&gt;it exists now&lt;/a&gt;. And yes, it supports everything I have mentioned, &lt;a href=&quot;http://wallabyjs.com/docs/integration/webpack.html&quot;&gt;Webpack&lt;/a&gt;, &lt;a href=&quot;http://wallabyjs.com/docs/integration/node.html&quot;&gt;node.js&lt;/a&gt;, &lt;a href=&quot;http://wallabyjs.com/docs/integration/es-next.html&quot;&gt;ES6 and ES7&lt;/a&gt;, &lt;a href=&quot;http://wallabyjs.com/docs/integration/react-jsx.html&quot;&gt;React JSX&lt;/a&gt;, &lt;a href=&quot;http://wallabyjs.com/docs/integration/typescript.html&quot;&gt;TypeScript&lt;/a&gt; and &lt;a href=&quot;http://wallabyjs.com/docs/integration/coffeescript.html&quot;&gt;CoffeeScript&lt;/a&gt;, &lt;a href=&quot;http://wallabyjs.com/docs/integration/overview.html&quot;&gt;many other technologies and their crazy combinations&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Heroes of JavaScript and Testing</title>
   <link href="http://dm.glhttp://dm.gl//2015/05/29/heroes-of-javascript-and-testing/"/>
   <updated>2015-05-29T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/05/29/heroes-of-javascript-and-testing</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;/assets/starship.jpg&quot; class=&quot;right-image&quot; style=&quot;width: 300px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In 1995, Earth has become a JavaScript faring Federation. While colonizing new web technologies, humans have encountered an insectoid species known as &lt;strong&gt;“Bugs”&lt;/strong&gt;. The bugs appear to be little more than killing machines, though there are suggestions that they were provoked by the intrusion of humans into their habitats.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/knight.jpg&quot; class=&quot;right-image&quot; style=&quot;width: 300px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I have taken a few lines from the “Starship Troopers” plot summary, but it sometimes feels like comparing to the Federation tech, we are still like &lt;strong&gt;medieval knights&lt;/strong&gt; with our &lt;strong&gt;JavaScript weapons&lt;/strong&gt;. Especially when killing bugs, or doing &lt;strong&gt;automated testing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Hail fellow, I bid thee welcome, and ask you to join my journey to the cellars of the &lt;strong&gt;JavaScript testing armory&lt;/strong&gt;.&lt;/p&gt;

&lt;h3 id=&quot;clubs&quot;&gt;Clubs&lt;/h3&gt;

&lt;p&gt;Our great ancestors, who stood shoulder to shoulder against the first bugs, used &lt;code class=&quot;highlighter-rouge&quot;&gt;alert&lt;/code&gt;. Legendary &lt;strong&gt;spiked club&lt;/strong&gt;, it crushed many simple enemies.
&lt;img src=&quot;/assets/alert.jpg&quot; class=&quot;right-image&quot; style=&quot;width: 300px; margin-top: 20px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It’s glorified version &lt;code class=&quot;highlighter-rouge&quot;&gt;console.log&lt;/code&gt;, or a &lt;strong&gt;morning star&lt;/strong&gt;, is used nowadays. It may cause some confusion in enemy rear areas, but is not good enough to be used as a systematic approach for significant size battles.&lt;/p&gt;

&lt;h3 id=&quot;swords&quot;&gt;Swords&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Testing frameworks, or swords&lt;/strong&gt;, are the main weapons in our merciless fights.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/Gladius.jpg&quot; class=&quot;right-image&quot; style=&quot;width: 150px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://qunitjs.com/&quot;&gt;QUnit&lt;/a&gt;, or the Gladius&lt;/strong&gt;. Quite old and oddly looking to some modern knights, it covered itself with glory in jQuery lands. Used to be, and for many remains, a very fearsome weapon.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/great_sword.png&quot; class=&quot;right-image&quot; style=&quot;width: 150px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://jasmine.github.io/&quot;&gt;Jasmine&lt;/a&gt;, or the Great sword&lt;/strong&gt;. Large and two-handed sword in a sense that you don’t need anything else in your hands. It comes with the expectation framework and out-of-box mocking support. What else does a good knight need to kill a dozen or two of bugs with?&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/arming_sword.png&quot; class=&quot;right-image&quot; style=&quot;width: 150px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://mochajs.org/&quot;&gt;Mocha&lt;/a&gt;, or the Arming sword&lt;/strong&gt;. Being simpler, smaller and faster, it allows to carry something else, such as an assertion library of your choice to make your bug enemies look miserable. Not only the sword can be you best friend in the land of JavaScript, but also in the Seas of &lt;a href=&quot;http://nodejs.org/&quot;&gt;Node.js&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;shields&quot;&gt;Shields&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/assets/shield.png&quot; class=&quot;right-image&quot; style=&quot;width: 150px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Various application frameworks are like shields&lt;/strong&gt;. Many knights love sitting around the Round Table of Internet and debate days and nights which shield is better. For smaller battles, you may be fine without it or with your own one. For larger battles, some good and tested by other knights shield will better protect you from certain bugs.&lt;/p&gt;

&lt;h3 id=&quot;siege-engines&quot;&gt;Siege engines&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/assets/trebuchet.jpg&quot; class=&quot;right-image&quot; style=&quot;width: 150px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Browser automation tools&lt;/strong&gt; and E2E testing frameworks, like &lt;a href=&quot;http://www.seleniumhq.org/&quot;&gt;Selenium&lt;/a&gt;, &lt;a href=&quot;http://www.seleniumhq.org/projects/webdriver/&quot;&gt;WebDriver&lt;/a&gt;, &lt;a href=&quot;https://angular.github.io/protractor/#/&quot;&gt;Protractor&lt;/a&gt;, etc. are the &lt;strong&gt;siege engines&lt;/strong&gt; of testing. Like catapult, ballista or trebuchet, they are bulky, slow and hard to set up. Nevertheless, when up and shooting, will do a good job in destroying the enemy’s rampart.&lt;/p&gt;

&lt;h3 id=&quot;armour&quot;&gt;Armour&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Code editors is our armour&lt;/strong&gt;, that’s what we spend endless battles with bugs in. Blacksmiths from different kingdoms all over the world are doing the great job to satisfy any knight’s taste.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/armour.jpg&quot; class=&quot;right-image&quot; style=&quot;width: 350px&quot; /&gt;
Some armour is heavy and large but solid, some is smaller and more lightweight but may require a few patches here and there.&lt;/p&gt;

&lt;p&gt;We have a &lt;a href=&quot;http://www.sublimetext.com/&quot;&gt;very sublime armour&lt;/a&gt; from one humble blacksmith, some solid merchandise from the &lt;a href=&quot;https://www.jetbrains.com/webstorm/&quot;&gt;JetBrains guild&lt;/a&gt;, a couple of nice sets from the &lt;a href=&quot;https://www.visualstudio.com/&quot;&gt;Microsoft kingdom&lt;/a&gt;, elegant armour from the &lt;a href=&quot;https://atom.io/&quot;&gt;GitHub’s forge&lt;/a&gt; and even ancient &lt;a href=&quot;http://www.vim.org/&quot;&gt;Dark Elvi&lt;strike&gt;m&lt;/strike&gt;n one&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;magic&quot;&gt;Magic&lt;/h3&gt;

&lt;p&gt;JavaScript is the main language we, mighty knights, speak. However, many of us have learned to record our wisdom in other languages and dialects. From far away lands of C# and Ruby, &lt;a href=&quot;http://www.typescriptlang.org/&quot;&gt;TypeScript&lt;/a&gt; and &lt;a href=&quot;http://coffeescript.org//&quot;&gt;CoffeeScript&lt;/a&gt; came to help us in our war. From across the Seas of Node.js, CommonJs reinforcements have arrived. Even within our homeland, the language evolves and we more often hear minstrels singing glorious tales in ES6 or ES7.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/magic.jpg&quot; class=&quot;right-image&quot; style=&quot;width: 350px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In order to make it work against our enemies, we need some magic. Opening a scroll with a good TypeScript or ES7 spell and using it together with a potion of &lt;a href=&quot;https://babeljs.io/&quot;&gt;Babel Transpilation&lt;/a&gt;, sorcery of &lt;a href=&quot;http://webpack.github.io/&quot;&gt;Webpack&lt;/a&gt; and &lt;a href=&quot;http://browserify.org/&quot;&gt;Browserify&lt;/a&gt; or witchcraft of &lt;a href=&quot;http://requirejs.org/&quot;&gt;require.js&lt;/a&gt;, we make even our strongest bug enemies shake in fear.&lt;/p&gt;

&lt;h3 id=&quot;squires&quot;&gt;Squires&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Squires, or testing tools&lt;/strong&gt; - are our humble servants. They more or less know your weaponry and armour, your spells chest content. Some ascetic knights can travel and fight without them, but normally a knight has a few.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/builders.gif&quot; class=&quot;right-image&quot; style=&quot;width: 130px&quot; /&gt;
&lt;a href=&quot;http://gruntjs.com/&quot;&gt;Grunt&lt;/a&gt; and &lt;a href=&quot;http://gulpjs.com/&quot;&gt;Gulp&lt;/a&gt;, brothers from one mighty but peaceful clan, with a few less known relatives. The brothers are strong and brave, and can even run your tests, but they were &lt;strong&gt;born to build your castle, not to slay bugs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/page.gif&quot; class=&quot;right-image&quot; style=&quot;width: 130px&quot; /&gt;
&lt;strong&gt;HTML test page&lt;/strong&gt;. Easy and responsive chap, but a bit dumb and you need to poke him to make him work. You need to tell him what to do (add your scripts and tests) and when. Page refresh driven development in all of its beauty.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/jstd.gif&quot; class=&quot;right-image&quot; style=&quot;width: 130px&quot; /&gt;
&lt;a href=&quot;https://code.google.com/p/js-test-driver/&quot;&gt;JSTestDriver&lt;/a&gt;. Old man from the Google kingdom. Hard-working and with Java in his heart, he had spent his best years running our countless tests. Knows when to run your tests, certain armour types friendly.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/karma.gif&quot; class=&quot;right-image&quot; style=&quot;width: 130px&quot; /&gt;
&lt;a href=&quot;http://karma-runner.github.io/&quot;&gt;Karma&lt;/a&gt;. JSTestDriver’s son, who has taken the best from his father. Supports some armour types, very open fellow. As his father, Karma knows when to run your tests, but has no idea what tests to run, so just runs them all. It makes him perfect for some smaller battles, but he is a bit slow for medium and especially large ones. Also, Karma can’t swim the Seas of Node.js.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wlb.jpg&quot; class=&quot;right-image&quot; style=&quot;width: 150px&quot; /&gt;
&lt;a href=&quot;http://wallabyjs.com/&quot;&gt;Wallaby.js&lt;/a&gt;. Highly skilled mercenary, specially trained to continuously kill bugs and do it fast. Not only he knows when to run your tests, he also knows how to run only those that are affected by your changes. Proficient with pretty much every weapon, shield and magic type listed in the article. Knows how to mix them well, more than just friendly to certain armour types. &lt;a href=&quot;http://wallabyjs.com/purchase&quot;&gt;For a few gold coins in the nearby tavern&lt;/a&gt; you may get yourself a great helper for a battle of any size.&lt;/p&gt;

&lt;p&gt;Fare thee well, mighty knights! &lt;strong&gt;Choose your weapons wisely and let there be no mercy for the bugs.&lt;/strong&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Wallaby.js for Visual Studio</title>
   <link href="http://dm.glhttp://dm.gl//2015/05/18/wallaby-for-visual-studio/"/>
   <updated>2015-05-18T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/05/18/wallaby-for-visual-studio</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://wallabyjs.com/&quot;&gt;Wallaby.js&lt;/a&gt; is a &lt;strong&gt;continuous test runner for JavaScript&lt;/strong&gt;. It solves the &lt;strong&gt;fundamental issue of being able to provide an instant feedback from your tests as you write your code, no matter how large your codebase is&lt;/strong&gt;. Wallaby.js uses dependency analysis to only execute tests affected by your code changes and leverages parallel test execution.&lt;/p&gt;

&lt;p&gt;It also displays test execution results, &lt;strong&gt;including code coverage, right in your code editor&lt;/strong&gt;. If you have used NCrunch for C#, then many of wallaby.js UI concepts will be familiar to you.&lt;/p&gt;

&lt;p&gt;Up until recently wallaby.js only supported IntelliJ platform editors, such as WebStorm and IntelliJ IDEA. Today I am happy to announce that wallaby.js adds support for &lt;strong&gt;Visual Studio 2013 (Update 4; Community, Professional, Premium and Ultimate editions)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/vs.gif&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;setting-up&quot;&gt;Setting up&lt;/h2&gt;

&lt;p&gt;First, you need to download wallaby.js VSIX from &lt;a href=&quot;http://wallabyjs.com/#download-vs&quot;&gt;our website&lt;/a&gt; and install it in your Visual Studio. Once installed, wallaby.js may be managed as all other “Extensions and Updates”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/extensions_and_updates.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For this blog post I will use &lt;a href=&quot;https://github.com/wallabyjs/public/tree/master/sample/visualstudio&quot;&gt;this sample from our public GitHub repository&lt;/a&gt;. You can clone it to try locally:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/wallabyjs/public
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;or just &lt;a href=&quot;https://github.com/wallabyjs/public/archive/master.zip&quot;&gt;download the zip file with the source code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once you have the source code locally, open &lt;code class=&quot;highlighter-rouge&quot;&gt;sample/visualstudio/Wallaby-Sample.sln&lt;/code&gt; solution.&lt;/p&gt;

&lt;p&gt;You will find a simple calculator project there and a few wallaby configuration files for different testing frameworks. Wallaby &lt;a href=&quot;http://wallabyjs.com/docs/config/overview.html&quot;&gt;configuration file is a simple JSON or JavaScript file&lt;/a&gt; in your project root folder with just a couple of mandatory settings.&lt;/p&gt;

&lt;p&gt;Wallaby supports lots of technologies, we have &lt;a href=&quot;http://wallabyjs.com/docs/integration/overview.html&quot;&gt;collection of sample projects with configuration files&lt;/a&gt; for different tools, frameworks and languages, such as &lt;strong&gt;Webpack, Browserify, ES6 and ES7 via Babel, TypeScript and CoffeeScript, React and Angular, node.js and io.js, etc&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/tech.png&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;first-steps&quot;&gt;First steps&lt;/h2&gt;

&lt;p&gt;In this sample we will be using vanilla JavaScript. Let’s try starting wallaby.js: right click on the &lt;code class=&quot;highlighter-rouge&quot;&gt;wallaby-jasmine-2.1.json&lt;/code&gt; configuration file in the Solution Explorer and select &lt;code class=&quot;highlighter-rouge&quot;&gt;Start Wallaby.js&lt;/code&gt; from context menu. Wallaby will start with selected configuration file.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/start_command.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To stop wallaby.js, you may use &lt;code class=&quot;highlighter-rouge&quot;&gt;Stop Wallaby.js&lt;/code&gt; context menu item.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The very first time you run it, wallaby.js may take a minute or two&lt;/strong&gt; to install all the dependencies it needs, such as node.js and PhantomJs. It only does this once and then uses the saved dependencies. The dependencies are updated automatically when required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now let’s have some fun.&lt;/strong&gt;&lt;/p&gt;

&lt;h2 id=&quot;code-coverage&quot;&gt;Code coverage&lt;/h2&gt;

&lt;p&gt;Once you have started wallaby.js, in the bottom right corner of the screen you’ll see wallaby status indicator. It’s job is pretty simple: when it displays a spinner - your tests are running, when it’s red - you have some failing tests, when it’s green - all of your tests are passing.&lt;/p&gt;

&lt;p&gt;Let’s open the sample calculator &lt;a href=&quot;https://github.com/wallabyjs/public/blob/master/sample/visualstudio/test/calculatorJasmineSpec.js&quot;&gt;Jasmine spec&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/main.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When wallaby.js is running, you can see the code coverage in the source files that it tracks (specified in the configuration file). As you can see, there are various colored squares displayed for each line of your source code.&lt;/p&gt;

&lt;p&gt;Jump to any of the passing tests and break it, for example try changing the 2 plus 2 expectation result to 5 in the &lt;code class=&quot;highlighter-rouge&quot;&gt;should add numbers&lt;/code&gt; test. Right after the change wallaby.js automatically runs your tests and displays the result in Visual Studio, right where you need to see it.&lt;/p&gt;

&lt;p&gt;Also, try editing some &lt;code class=&quot;highlighter-rouge&quot;&gt;console.log&lt;/code&gt; arguments or just &lt;code class=&quot;highlighter-rouge&quot;&gt;console.log&lt;/code&gt; any object you like.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The code coverage and inline messages are automatically be updated, just as you type&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is what coverage indicators mean:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Gray square means that the source line is not covered by any of your tests.&lt;/li&gt;
  &lt;li&gt;Green square means that the source line is covered by at least one of your tests.&lt;/li&gt;
  &lt;li&gt;Yellow square means that the source line is only partially covered by some of your tests.&lt;/li&gt;
  &lt;li&gt;Red square means that the source line is the source of an error or failed expectation, or is in the stack of an error.&lt;/li&gt;
  &lt;li&gt;Pink square means that the source line is on the execution path of a failing test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You may also inspect wallaby.js output in the &lt;code class=&quot;highlighter-rouge&quot;&gt;Output&lt;/code&gt; tool window. In the tool window you may view output from &lt;code class=&quot;highlighter-rouge&quot;&gt;Failing Tests&lt;/code&gt; tab and &lt;code class=&quot;highlighter-rouge&quot;&gt;Console&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/console.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;Failing Tests&lt;/code&gt; output source displays all tests that are currently failing along with the error stacks and registered console.log calls. Some bits of the displayed information are hyperlinks that you can use with your mouse (&lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl + mouse click&lt;/code&gt;) or keyboard (&lt;code class=&quot;highlighter-rouge&quot;&gt;F12&lt;/code&gt;) to navigate to different places, for example to the exact error line, or a failing test, or a place where something is logged to console.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;Console&lt;/code&gt; output source displays some additional information about test execution progress. The tab can also be useful for troubleshooting wallaby.js issues.&lt;/p&gt;

&lt;h2 id=&quot;smart-actions&quot;&gt;Smart actions&lt;/h2&gt;

&lt;p&gt;To help you writing your code and tests more efficiently, wallaby.js provides a few smart actions available by clicking wallaby smart actions icon or pressing &lt;code class=&quot;highlighter-rouge&quot;&gt;Ctrl + .&lt;/code&gt; on any line.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/smart_actions.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The actions include:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Show line test(s) action&lt;/strong&gt;: displays the line related test data. This is the most frequently used action that allows you to quickly view and navigate to test and code errors, console messages related to some specific test or some source code line.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/peek_view.png&quot; style=&quot;margin-left: 40px&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Jump to failing test action&lt;/strong&gt;: allows to quickly navigate to the failing test from any “pink” context (the failing test execution path).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Jump to error source action&lt;/strong&gt;: allows to quickly navigate to the source of the test error from any “pink” context (failing test execution path).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Show line uncovered regions&lt;/strong&gt;: the action is useful for “yellow” lines to display what is exactly not covered in the line. Not covered expressions will be highlighted in red.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Show file uncovered regions&lt;/strong&gt;: the action is similar to the previous one, it displays uncovered regions for the whole file. The red highlights for both actions can be removed by pressing &lt;code class=&quot;highlighter-rouge&quot;&gt;Esc&lt;/code&gt; (or you can just start changing the file code and they will disappear).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/coverage_indicators.png&quot; style=&quot;margin-left: 40px&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Run line test(s)&lt;/strong&gt;: the action is pretty simple (yet so much wanted by so many people), it just runs a single test (if invoked from within the test) or all related tests (if invoked within some source code covered by the tests).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Run file test(s)&lt;/strong&gt;: the action runs all tests within the test file it is invoked in, or all tests in all the test files that cover the source file that the action is invoked within.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Show last run screen shot&lt;/strong&gt;: the action just does what it says. After every test run, wallaby.js captures a screen shot of the generated test runner page, so if you have some tests that are displaying anything - the action could be useful for you. Very powerful combo is using the action together with the &lt;code class=&quot;highlighter-rouge&quot;&gt;Run line test(s)&lt;/code&gt; - you run a specific test, then view the screen shot for the test. Please note that you may often have some “tear down” code, that clears the DOM before or after each test - wallaby.js is smart enough to capture the screenshot before the tear down code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/last_screenshot.png&quot; style=&quot;margin-left: 40px&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;fonts-and-colors&quot;&gt;Fonts and colors&lt;/h2&gt;

&lt;p&gt;If some of wallaby.js default colors don’t fit your theme, it’s very easy to adjust.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/fonts_and_colors.png&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;more-information&quot;&gt;More information&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;Follow us on twitter&lt;/a&gt; and &lt;a href=&quot;http://wallabyjs.com/#subscribe&quot;&gt;subscribe to our newsletter&lt;/a&gt; to stay updated.&lt;/li&gt;
  &lt;li&gt;Browse our &lt;a href=&quot;http://wallabyjs.com/docs&quot;&gt;documentation&lt;/a&gt;, &lt;a href=&quot;https://github.com/wallabyjs/public/issues&quot;&gt;ask questions or create issues&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Check out &lt;a href=&quot;http://wallabyjs.com/purchase&quot;&gt;wallaby.js pricing for Visual Studio&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Consider getting yourself a copy of &lt;a href=&quot;http://wallabyjs.com/purchase&quot;&gt;“Freedom” license&lt;/a&gt; today to help the project and &lt;strong&gt;be able to use wallaby.js in any editor that we support today and will support in future&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Wallaby.js is expanding - new languages and module bundlers</title>
   <link href="http://dm.glhttp://dm.gl//2015/04/13/wallaby-expanding/"/>
   <updated>2015-04-13T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/04/13/wallaby-expanding</id>
   <content type="html">&lt;p&gt;If you are new to &lt;a href=&quot;http://wallabyjs.com/&quot;&gt;wallaby.js&lt;/a&gt;, it is an intelligent test runner that solves the fundamental issue of being able to provide an instant feedback from your tests as you write your code, no matter how large your codebase is. Wallaby displays test execution results including code coverage right in your code editor. In this blog post I will cover new features that have been added during the last few weeks.&lt;/p&gt;

&lt;p&gt;
&lt;img src=&quot;/assets/typescriptLogo.png&quot; class=&quot;small-image&quot; /&gt;
&lt;img src=&quot;/assets/csLogo.png&quot; class=&quot;small-image&quot; /&gt;
&lt;img src=&quot;/assets/es7Logo.png&quot; class=&quot;small-image&quot; /&gt;
&lt;img src=&quot;/assets/browserifyLogo.png&quot; class=&quot;small-image&quot; /&gt;
&lt;img src=&quot;/assets/webpackLogo.png&quot; class=&quot;small-image&quot; /&gt;
&lt;/p&gt;

&lt;h2 id=&quot;typescript-coffeescript-es7&quot;&gt;TypeScript, CoffeeScript, ES7&lt;/h2&gt;

&lt;p&gt;Up until recently wallaby.js only supported JavaScript (up to ES6 plus React JSX). You could and can of course use any other language with &lt;a href=&quot;http://wallabyjs.com/docs/config/preprocessors.html&quot;&gt;preprocessors&lt;/a&gt; and wallaby.js can run tests for you, but it wasn’t able to display code coverage for anything but JavaScript (up to ES6 plus React JSX).&lt;/p&gt;

&lt;p&gt;Today I am happy to announce that wallaby.js adds support for &lt;strong&gt;TypeScript and CoffeeScript&lt;/strong&gt;. We also now support &lt;strong&gt;ES7 features via Babel&lt;/strong&gt;. Whether you have your whole codebase in one (or more) of those languages, or just prefer to write your tests using a language compiled to JavaScript - wallaby.js can display code coverage for the language of your choice.&lt;/p&gt;

&lt;p&gt;There is nothing special to configure to start using new features, just list your files in &lt;a href=&quot;http://wallabyjs.com/docs/config/overview.html&quot;&gt;wallaby configuration file&lt;/a&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;files&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;'src/*.ts'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// and/or&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;'src/*.coffee'&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;tests&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;'test/*.ts'&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// and/or&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;'test/*.coffee'&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;and you are ready to get real time coverage for TypeScript:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/ts.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;or CoffeeScript&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/cs.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There are sample projects with a couple of source files and wallaby.js configuration file in &lt;a href=&quot;https://github.com/wallabyjs/wallaby-coffeescript-sample&quot;&gt;CoffeeScript sample&lt;/a&gt; and &lt;a href=&quot;https://github.com/wallabyjs/wallaby-typescript-sample&quot;&gt;TypeScript sample&lt;/a&gt; repositories to get you started quickly.&lt;/p&gt;

&lt;p&gt;If you would like to start using ES6 and ES7 features in your tests or application code, wallaby.js has got you covered.&lt;/p&gt;

&lt;p&gt;Wallaby.js ships with a built-in &lt;a href=&quot;https://babeljs.io/&quot;&gt;Babel&lt;/a&gt; compiler integration. Simple configuration:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;wallaby&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;files&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'src/*.js'&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;

    &lt;span class=&quot;na&quot;&gt;tests&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'test/*Spec.js'&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;

    &lt;span class=&quot;na&quot;&gt;compilers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'**/*.js'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;wallaby&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;compilers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;babel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;and you are ready to enjoy ES7 magic with all wallaby.js features, such as &lt;a href=&quot;https://github.com/lukehoban/ecmascript-asyncawait&quot;&gt;async/await&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/es7babel.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And of course new features work with existing features, so you may use &lt;strong&gt;all combinations of supported technologies&lt;/strong&gt;. Whatever your stack looks like, for example, &lt;strong&gt;CoffeeScript with node.js or io.js, TypeScript with CommonJs via Webpack or ES7 async/await in your React.js application along wth JSX&lt;/strong&gt; - wallaby.js can provide you real-time code coverage and instant feedback from your tests.&lt;/p&gt;

&lt;p&gt;As I have promised before, we are (and will be) providing more and more ways to extend wallaby.js the way you need. For example, new languages support is added with a new &lt;a href=&quot;http://wallabyjs.com/docs/config/compilers.html&quot;&gt;extensibility concept called ‘compilers’&lt;/a&gt;. With wallaby.js compilers extensibility point you can also
your &lt;a href=&quot;http://wallabyjs.com/docs/config/compilers.html#writing-a-custom-compiler&quot;&gt;own custom compiler&lt;/a&gt; for any language.&lt;/p&gt;

&lt;h2 id=&quot;browserify-and-webpack&quot;&gt;Browserify and Webpack&lt;/h2&gt;

&lt;p&gt;Some of you are happily using CommonJs or AMD and NPM modules in browser with a solution to package code bundles/chunks for deployment. To support nice and fast code testing for such scenarios, a couple of weeks ago we have added a &lt;a href=&quot;http://wallabyjs.com/docs/config/postprocessor.html&quot;&gt;new extensibility concept to wallaby.js called ‘postprocessor’&lt;/a&gt;. With a stateful postprocessor it is possible to extend Wallaby core to leverage incremental compilation and caching features of &lt;a href=&quot;http://browserify.org/&quot;&gt;Browserify&lt;/a&gt; and &lt;a href=&quot;http://webpack.github.io/&quot;&gt;Webpack&lt;/a&gt; to keep providing an instant feedback from your tests when running them with wallaby.js.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/commonJs.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Both extensions, &lt;a href=&quot;https://github.com/wallabyjs/wallabify&quot;&gt;Wallabify&lt;/a&gt; and &lt;a href=&quot;https://github.com/jeffling/wallaby-webpack&quot;&gt;Wallaby-Webpack&lt;/a&gt;, are open source, pull requests with improvements are very welcome.&lt;/p&gt;

&lt;p&gt;In the above mentioned repositories you may find some recommendations on how to configure wallaby.js to use with Browserify and Webpack. You may also find simple examples with wallaby.js configuration &lt;a href=&quot;https://github.com/wallabyjs/wallaby-browserify-sample&quot;&gt;Browserify sample repository&lt;/a&gt; and &lt;a href=&quot;https://github.com/wallabyjs/wallaby-webpack-sample&quot;&gt;Webpack sample repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That’s it for the blog post, thanks for reading and hope it helps you to get started with new wallaby.js features in your project. Follow &lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;us on twitter&lt;/a&gt; to stay updated.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Testing React applications with wallaby.js</title>
   <link href="http://dm.glhttp://dm.gl//2015/03/11/wallaby-react/"/>
   <updated>2015-03-11T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/03/11/wallaby-react</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://wallabyjs.com/&quot;&gt;Wallaby.js&lt;/a&gt; is a continuous test runner. It runs your tests as you type and displays various results right inside your code editor. Wallaby.js allows you to test your React applications and &lt;a href=&quot;https://www.youtube.com/watch?v=uUmF16R9JNs&quot;&gt;get an instant feedback from your tests&lt;/a&gt;, no matter how large your codebase is and whether you are using browser environment or node.js with &lt;a href=&quot;https://github.com/tmpvar/jsdom&quot;&gt;jsdom&lt;/a&gt;. With wallaby.js, you can use any popular testing framework of your choice.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyReactIntro.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In this article I will describe how to test React application, specifically React components, using Jasmine and wallaby.js with code coverage, including &lt;strong&gt;code coverage inside JSX element JavaScript expressions&lt;/strong&gt;. You can find the full code &lt;a href=&quot;https://github.com/wallabyjs/wallaby-react-component&quot;&gt;in this repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;First, if you haven’t done it already, go ahead &lt;a href=&quot;http://wallabyjs.com/#download&quot;&gt;download&lt;/a&gt; and &lt;a href=&quot;http://wallabyjs.com/docs/intro/install.html&quot;&gt;install&lt;/a&gt; wallaby.js. Then clone &lt;a href=&quot;https://github.com/wallabyjs/wallaby-react-component&quot;&gt;this repository&lt;/a&gt; from WebStorm or command line, open the project and install dependencies.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/wallabyjs/wallaby-react-component.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next, create wallaby configuration file for your project. It is pretty straightforward, especially if you have used something like Karma before. You can name it &lt;code class=&quot;highlighter-rouge&quot;&gt;wallaby.js&lt;/code&gt; and put the following code into it:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;wallaby&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;na&quot;&gt;files&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;pattern&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'node_modules/react/dist/react-with-addons.js'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;instrument&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'assets/**'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'src/**'&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;

    &lt;span class=&quot;na&quot;&gt;tests&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'test/**/*Spec.jsx'&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;

    &lt;span class=&quot;na&quot;&gt;compilers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'**/*.js*'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;wallaby&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;compilers&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;babel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In the configuration file, we have specified the list of our application files and tests using glob patterns. We are also setting up a &lt;a href=&quot;http://wallabyjs.com/docs/integration/es-next.html&quot;&gt;compiler&lt;/a&gt; to convert &lt;code class=&quot;highlighter-rouge&quot;&gt;jsx&lt;/code&gt; files code to ES5 (so it can run in browser) using react tools.&lt;/p&gt;

&lt;p&gt;Other configuration options and the full format of wallaby.js configuration file is &lt;a href=&quot;http://wallabyjs.com/docs/config/overview.html&quot;&gt;described in wallaby.js documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We are ready to go now - start wallaby.js run configuration using &lt;em&gt;Run&lt;/em&gt; menu or keyboard shortcut.&lt;/p&gt;

&lt;p&gt;When starting for the first time, wallaby.js will download and install some dependencies. Those include &lt;a href=&quot;http://nodejs.org/&quot;&gt;node.js&lt;/a&gt;, that is used to run wallaby.js, and &lt;a href=&quot;http://phantomjs.org/&quot;&gt;PhantomJs&lt;/a&gt; headless browser engine to run your tests in. The installation may take a minute or so and only happens once.&lt;/p&gt;

&lt;p&gt;After the start, wallaby.js displays its tool window at the bottom:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularToolWindow.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;and its status indicator at the right bottom corner of the window.&lt;/p&gt;

&lt;p&gt;The indicator displays a spinner when your tests are running, red icon if any of the tests is failing and green icon if all tests are passing. The tool window &lt;em&gt;Failing tests&lt;/em&gt; tab displays the information about failing tests, such as error stacks and failed expectation details.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularIndicator.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Once started, you don’t need to restart wallaby.js run configuration to run your tests, as it does it automatically, as you change your code&lt;/strong&gt;. You can hide the tool window by using the &lt;em&gt;Hide icon&lt;/em&gt; in its right top corner, as you will be getting the information about failing tests right in the context of the code that you’re editing. You can always get the tool window back by clicking wallaby.js status indicator.&lt;/p&gt;

&lt;p&gt;Now, let’s see wallaby.js in action. This project contains a sample implementation of a composite user profile control&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;UserProfile&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;React&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ProfilePicture&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;        &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;FollowButton&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;      &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/div&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;    &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;that displays a user picture&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ProfilePicture&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;React&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'assets/'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;username&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'.jpg'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;    &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;and also has a “Follow” button that displays user name and changes its text when clicked.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;FollowButton&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;React&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;handleClick&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;setState&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'Unfollow'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;onClick&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;handleClick&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'unfollow'&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'follow'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;
          &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'Follow '&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;props&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/p&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;
&lt;/span&gt;    &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Now, let’s open the application spec &lt;code class=&quot;highlighter-rouge&quot;&gt;test/avatarSpec.jsx&lt;/code&gt;.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;s1&quot;&gt;'use strict'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;testUtils&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;React&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addons&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;TestUtils&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;describe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'User Profile'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;instance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;beforeEach&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'div'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;instance&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;React&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;UserProfile&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Homer'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                            &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;afterEach&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;removeChild&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

  &lt;span class=&quot;nx&quot;&gt;describe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Follow button'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;it&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'should display user name'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;expect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;instance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getDOMNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;textContent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toBe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Follow Homer'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;it&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'should change its text to &quot;Unfollow&quot; when clicked'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;testUtils&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Simulate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;testUtils&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;findRenderedDOMComponentWithTag&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;instance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'p'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;

      &lt;span class=&quot;nx&quot;&gt;expect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;instance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getDOMNode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;textContent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;toBe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Unfollow'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;We are testing that the “Follow” button works as expected by rendering a user profile, checking the button text, clicking it and checking its changed text.&lt;/p&gt;

&lt;p&gt;When wallaby.js is up and running, you should be able to see coverage indicators in the gutter of the code editor in your tests and other source files.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyReactEditor.png&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Gray square means that the source line is not covered by any of your tests.&lt;/li&gt;
  &lt;li&gt;Green square means that the source line is covered by at least one of your tests.&lt;/li&gt;
  &lt;li&gt;Yellow square means that the source line is only partially covered by some of your tests.&lt;/li&gt;
  &lt;li&gt;Red square means that the source line is the source of an error or failed expectation, or is in the stack of an error.&lt;/li&gt;
  &lt;li&gt;Pink square means that the source line is on the execution path of a failing test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On any line of the source code you can hit &lt;em&gt;Alt + Enter&lt;/em&gt; (or use the light bulb icon) to display the list wallaby.js context actions. You can read more about all actions &lt;a href=&quot;http://wallabyjs.com/docs/intro/get-started-jetbrains.html#context-actions&quot;&gt;in the documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For this example, let’s mute one of the tests. The easiest way to do this is to change &lt;code class=&quot;highlighter-rouge&quot;&gt;it&lt;/code&gt; test function to &lt;code class=&quot;highlighter-rouge&quot;&gt;xit&lt;/code&gt;. This will make Jasmine to ignore the test.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyReactXit.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As you can see, wallaby.js immediately executes the test and marks the test lines with gray markers, because they are not executed anymore. It also changes &lt;code class=&quot;highlighter-rouge&quot;&gt;src/components/FollowButton.jsx&lt;/code&gt; file indicators.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyReactYellow.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We can also see that &lt;code class=&quot;highlighter-rouge&quot;&gt;handleClick&lt;/code&gt; function is not invoked anymore, so it has a gray indicator next to it. We also see yellow indicators next to the JSX element JavaScript expression lines of code. It means that the expression code is only partially covered by our tests. To know what exactly is NOT covered, let’s hit &lt;em&gt;Alt + Enter&lt;/em&gt; and use ‘Show file uncovered regions’ context action.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyReactUncovered.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now we clearly see what is exactly not covered inside the lines with the yellow coverage indicator. Because we have muted the test that was clicking the button, &lt;code class=&quot;highlighter-rouge&quot;&gt;unfollow&lt;/code&gt; CSS class is not assigned to the button tag and because &lt;code class=&quot;highlighter-rouge&quot;&gt;handleClick&lt;/code&gt; function is not invoked anymore, &lt;code class=&quot;highlighter-rouge&quot;&gt;this.state&lt;/code&gt; is undefined so &lt;code class=&quot;highlighter-rouge&quot;&gt;this.state.text&lt;/code&gt; is never evaluated and not set as the button text.&lt;/p&gt;

&lt;p&gt;Wallaby.js tracks coverage for logical expressions and conditional operators, as you may see it supports JSX as well (and &lt;a href=&quot;http://dm.gl/2015/02/23/wallaby-version-one/&quot;&gt;ES6 and many more technologies&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Using wallaby.js context actions you can quickly jump to the failing test or the error source, display tests that are covering some particular line of code, inspect &lt;code class=&quot;highlighter-rouge&quot;&gt;console.log&lt;/code&gt; output of each individual test, full error stacks and expectation errors, and much more.&lt;/p&gt;

&lt;p&gt;Let’s try to make one of our tests fail:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyReactInline.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Immediately as we do so, wallaby.js displays the expectation error right where it occurs. The test path line indicators become pink, the source of the error line indicator is now red.&lt;/p&gt;

&lt;p&gt;Apart from displaying errors, where and when they occur, wallaby.js also displays console.log output in a similar manner, so if you’re a fan of console.log, wallaby.js can make you very productive. Now you don’t have to leave your editor anymore to console.log all the things.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/console.log.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, if you would like to see what is actually displayed when wallaby.js runs your tests, you may use “Show last screenshot” context action to get a realisation that your app is not just a bunch of components but is something alive.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyReactScreen.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Please note, that you have to run a test, that you’d like to see a screenshot for, by using “Run scope test(s)” action within the test first. The reason is simple - normally you have many tests and there’s also some tear down code in the &lt;code class=&quot;highlighter-rouge&quot;&gt;afterEach&lt;/code&gt; function. However, when you run one specific test, wallaby.js makes a screenshot before the tear down code is executed.&lt;/p&gt;

&lt;p&gt;That’s it for the blog post, thanks for reading and hope it helps you to get started with wallaby.js in your React project. Follow &lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;us on twitter&lt;/a&gt; to stay updated.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Bringing together JavaScript live editing and testing.</title>
   <link href="http://dm.glhttp://dm.gl//2015/03/05/JavaScript-live-editing-and-testing/"/>
   <updated>2015-03-05T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/03/05/JavaScript-live-editing-and-testing</id>
   <content type="html">&lt;p&gt;8-bit Super Mario Bros was the very first video game that I have played as a kid. Later there were no less awesome  Battle City, Chip ‘N Dale, Teenage Mutant Ninja Turtles, Duck Tales, Battletoads, Darkwing Duck and many more. Those happy days, when I couldn’t even imagine that I’m going to become a programmer.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/nes.jpg&quot; class=&quot;centered&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Many years later, when I became a programmer and had spent several years in the industry, I was watching the &lt;a href=&quot;https://vimeo.com/36579366&quot;&gt;“Inventing on Principle” talk by Bret Victor&lt;/a&gt;. I am pretty sure, many of you have seen the talk, and even know a few software development tools inspired by it or just following the similar ideas.&lt;/p&gt;

&lt;p&gt;As many of you, I have been amazed how in the presentation Mario looking dude jumps higher as we change the velocity, or how the tree blossoms right when we change the code.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/invbp.jpg&quot; class=&quot;right-image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We are also amazed when in some demos we change some code on a web page, right in DevTools or some other tool, click some button and see the result without the page reload.&lt;/p&gt;

&lt;p&gt;These ideas are great and inspiring, but then we get back to our daily job to find out about the cruel reality.&lt;/p&gt;

&lt;p&gt;First, it gets &lt;strong&gt;annoying very quickly to switch between our code editor and our browser to make Mario jump&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Later, some other developer changes the game level, everything suddenly breaks, it’s 9pm and we sitting at work and &lt;strong&gt;manually making Mario jump again and again&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Or worse, your version of jumping Mario is actually a button in a form somewhere deep inside your web application. And to click the button that would run some ‘live’ reloaded function, you have to do &lt;strong&gt;several steps each time before that function gets executed&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Hot swapping and live editing does help for CSS and HTML reloading, can also help when you are debugging JavaScript and would like to quickly change some very simple stuff. But then you make a change to your JavaScript code and your live editing tool can’t catch up and the whole page reload is required. All because what seemed as a trivial change to you, is often a high wall for ‘live’ editing solutions and code hot-swappers. And they simply can’t jump over the wall, no matter how hard they try and excel in what they do. &lt;strong&gt;The issue is not only in technology, it’s also the approach that matters&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/MarioFail.jpg&quot; class=&quot;centered&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So, why does it look nice in all those presentations and doesn’t work for you?&lt;/p&gt;

&lt;p&gt;The reason is simple and obvious. &lt;strong&gt;Your application complexity goes beyond simple demos&lt;/strong&gt; and vanilla live editing approaches don’t scale. You don’t just have a simple &lt;code class=&quot;highlighter-rouge&quot;&gt;setInterval&lt;/code&gt;/&lt;code class=&quot;highlighter-rouge&quot;&gt;setTimeout&lt;/code&gt;/&lt;code class=&quot;highlighter-rouge&quot;&gt;requestAnimationFrame&lt;/code&gt; callback or a single form hosted right in your &lt;code class=&quot;highlighter-rouge&quot;&gt;index.html&lt;/code&gt;. Your code changes are not limited to some easily hot-swappable ones.&lt;/p&gt;

&lt;p&gt;Moreover, you pretty much always have to set up some context before executing any code and &lt;strong&gt;there’s no auto-magic solution to create/restore a desired context for your hot swapped code execution&lt;/strong&gt;. You may need to manually take like 5 different steps before freaking Mario can jump or before you can click that button again to trigger your hot-swapped code. And all that ‘live’ and ‘hot’ quickly become no more attractive than your old-school coding approaches, if not less attractive.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/Mario-Question-Block.jpg&quot; class=&quot;right-image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, is truly live JavaScript editing with instant feedback even possible at all in real-world apps?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The answer is yes. Automated and instant feedback beyond simple prototypes is possible with &lt;strong&gt;recorded, runnable, relatively small/fast and isolated scenarios&lt;/strong&gt;. We have had the name for those for a long time and the name is &lt;strong&gt;tests&lt;/strong&gt;. TDD/BDD or not, Given-When-Then or Arrange-Act-Assert, test first or after, or mixed - the important thing that tests have to be written.&lt;/p&gt;

&lt;p&gt;When you are writing and later maintaining the bulk of your application logic, it’s not the visual image of jumping Mario that helps you making your inventions. No doubt, visualising things can help to get things started, then later to get a feeling that it is all real. To get a realisation that your app is not just a combo of your Controllers, Models and Views, but something alive. Surely, you may occasionally check that your Mario looks good and jumps when you press your keyboard keys. You may even write some E2E test for it.&lt;/p&gt;

&lt;p&gt;But &lt;strong&gt;you don’t need your browser to make your Mario jump again and again&lt;/strong&gt;. You don’t need to see the sky background every time, you don’t need to press your keyboard keys manually. Not only you can be “inventing on principle”, &lt;strong&gt;you can automate your invention process&lt;/strong&gt; and make it more focused and efficient.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/mario_scrudge.jpg&quot; class=&quot;right-image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you need to check something about how Mario jumps, just record the fact that Mario can jump into that hole as a verifiable and fast spec/test. Make it work for you not just once or twice, but when you change the size of the hole, when you change its position, when you change Mario to Luigi, or even to Scrooge McDuck.&lt;/p&gt;

&lt;p&gt;So for the most part of your work: get rid of what you don’t need - close your browser, put on your headphones, open your code editor and nothing else, and do the bulk of your work efficiently. Write tests and code, let right tools to run it automatically and without distraction, get an instant feedback as you type.&lt;/p&gt;

&lt;p&gt;At the end of the day, it doesn’t matter if your running program is reloaded or not, what is running your program and how it reloads it, &lt;strong&gt;as long as the feedback for your code changes is close to instant&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At this point, you may say: ok, but wait a minute. Tests are good, we have a thousand or two and mostly run them overnight or very infrequently, because it’s too expensive to run them on code changes. So how does it relate to &lt;strong&gt;live&lt;/strong&gt; JavaScript editing, and how do I make my &lt;strong&gt;tests live&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;The answer is using the right tool.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/princess.jpg&quot; class=&quot;right-image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;First, running tests that you don’t need to run is a waste of time. If you changed one test or some code that is covered only by few tests, then why do you need to run hundreds of them? You wouldn’t want to complete all levels of Mario game every time you change princess Peach rescue scene, would you?&lt;/p&gt;

&lt;p&gt;Second, getting your tests feedback somewhere outside your code editor, or even somewhere far from the line of the code that you are editing, is also not good enough anymore.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/logo160x160.png&quot; class=&quot;left-image&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The tool in JavaScript land that can make your your tests and code truly live is &lt;a href=&quot;http://wallabyjs.com/&quot;&gt;wallaby.js&lt;/a&gt;. Without you having to change your testing framework or use any special APIs in your tests, wallaby runs minimal required set of tests for your changes, just as you type. It displays the feedback immediately and where you need it most.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallaby.gif&quot; class=&quot;centered&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And if you’d like to get some visual feedback, you can use wallaby feature to display a screenshot of the test result. It supports not only HTML and CSS, but also SVG and Canvas. So if your test makes Mario jump, wallaby can show you jumping Mario, just like the calculator with buttons and screen &lt;a href=&quot;https://www.youtube.com/watch?v=uUmF16R9JNs&quot;&gt;in this video&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Most importantly, wallaby.js goes way beyond shiny simple demos, &lt;strong&gt;it really helps in real-world applications&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote class=&quot;twitter-tweet&quot; lang=&quot;en&quot;&gt;&lt;p&gt;Worked on reducing down the 30 second wait for 1800 angular unit tests to run in Karma. Got it down to, well, instant with &lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;@wallabyjs&lt;/a&gt; :D&lt;/p&gt;&amp;mdash; Andrew Shelton (@Sheltonial) &lt;a href=&quot;https://twitter.com/Sheltonial/status/573064488905097216&quot;&gt;March 4, 2015&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; src=&quot;//platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;

&lt;p&gt;We support various technologies and have a few repositories to get you started with wallaby.js quickly:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/wallabyjs/public/tree/master/sample/jetbrains/&quot;&gt;Calculator for browser environment&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/wallabyjs/wallaby-node-iojs-sample/&quot;&gt;Calculator for node.js and io.js environment&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/wallabyjs/wallaby-requirejs-sample/&quot;&gt;Wallaby.js with require.js app&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/wallabyjs/wallaby-angular-todomvc-sample/&quot;&gt;Wallaby.js with angular.js app&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/wallabyjs/wallaby-react-todomvc-sample/&quot;&gt;Wallaby.js with react.js and JSX with babel and react tools&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/wallabyjs/wallaby-es6-sample/&quot;&gt;Wallaby.js with browser ES6 via babel (former 6to5) preprocessor&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So &lt;strong&gt;go ahead and start live editing JavaScript today, make your code and tests truly live with &lt;a href=&quot;http://wallabyjs.com/&quot;&gt;wallaby.js&lt;/a&gt;&lt;/strong&gt;. Follow &lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;us on twitter&lt;/a&gt; to stay updated.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Wallaby.js gets its first full-time developer and is looking for investors</title>
   <link href="http://dm.glhttp://dm.gl//2015/03/03/wallaby-first-developer-and-investors/"/>
   <updated>2015-03-03T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/03/03/wallaby-first-developer-and-investors</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://wallabyjs.com/&quot;&gt;Wallaby.js&lt;/a&gt;, our smart test runner, that makes you &lt;a href=&quot;https://www.youtube.com/watch?v=uUmF16R9JNs&quot;&gt;extremely productive when you are writing your JavaScript code and tests&lt;/a&gt;, is getting some great traction. More and more people are starting to use wallaby.js, community based plugins are starting to emerge. We have released &lt;a href=&quot;http://dm.gl/2015/02/23/wallaby-version-one/&quot;&gt;version one&lt;/a&gt;, are already covering a great part of the mainstream JavaScript technologies and frameworks, and we are &lt;a href=&quot;https://github.com/wallabyjs/public/issues&quot;&gt;working on more&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Wallaby.js goal is to teach how and help the community to write testable and tested JavaScript applications of any scale with an immediate feedback from the tests. We would like to support as many code editors as we can, to bring wallaby love to everyone, from Vim users to various IDE users. Future plans include exposing more APIs and even gradually open sourcing the core of  wallaby.js or its parts once our business gets a bit stronger. We also have many other ideas &lt;a href=&quot;http://wallabyjs.com/#plans&quot;&gt;on our roadmap&lt;/a&gt; and &lt;strong&gt;some not yet announced but, trust me, very exciting and ambitious plans&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The technology and the approach (parallel and especially incremental test runs) that we use is unique and highly scalable. Efficient combo of our strict and complex runtime analysis based rules, along with a lot of experience based heuristics, makes wallaby.js a very special and smart tool. Our small team is dedicated to make wallaby.js an essential tool for writing and testing JavaScript, and I am confident that we will do it sooner or later.&lt;/p&gt;

&lt;p&gt;Creating and maintaining professional and production quality tools of such scale, working in a variety of environments, using half a dozen of programming languages - not only requires a dedicated and highly motivated team but also an adequate financing. So far, myself and my small team have been working on wallaby.js in our spare time. As of today, &lt;strong&gt;I have made a decision to suspend my employment contract and start working on wallaby.js full-time&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/invest.png&quot; style=&quot;height: 350px; float: right; margin-left: 20px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It’s a big step for me personally. I knew I would do it one day and was prepared to face it, but when the day comes - it is still very exciting and scary at the same time.&lt;/p&gt;

&lt;p&gt;While I have a solid plan to make wallaby.js community focused and sustainable business by selling commercial licenses, &lt;strong&gt;I would also like to try to boost wallaby.js evolution and development by trying to attract some additional external financing/investments&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You may already be using wallaby.js in your team and finding it helpful. Maybe you just like the idea and would like to see it in more editors, supporting more technologies and languages, supporting cloud testing, and would like to see it quickly becoming a high quality and affordable instrument for you and your team. In either case, &lt;strong&gt;please pass the information to the people you think might be interested in helping wallaby.js to reach its shiny future faster&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That’s it for the post, thanks for reading, follow &lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;us on twitter&lt;/a&gt; to stay updated. Drop me a line &lt;a href=&quot;mailto:artem.govorov@gmail.com&quot;&gt;artem.govorov@gmail.com&lt;/a&gt; if you have any questions or suggestions.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>The story of one inner hipster, part one.</title>
   <link href="http://dm.glhttp://dm.gl//2015/02/28/story-of-one-inner-hipster-part-one/"/>
   <updated>2015-02-28T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/02/28/story-of-one-inner-hipster-part-one</id>
   <content type="html">&lt;h2 id=&quot;chapter-one-our-sick-industry&quot;&gt;Chapter one. Our sick industry.&lt;/h2&gt;

&lt;p&gt;About a year and a half ago, my career path took a bit unexpected turn. After spending 10 years in product teams and custom development, doing .NET consulting and web programming - everything has suddenly changed. I have caught the virus of developing ‘my own thing’.&lt;/p&gt;

&lt;p&gt;From what I see around - it’s a pretty common ‘disease’ in our industry. One day you get bored working in the bloody enterprise software business and your inner hipster demands some revolutionary changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My next personal project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/nextPersonalProject.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The virus symptoms may be different - some are seeking financial freedom and wealth, some just want to do what they want to and not what they are being told to. Your idea may be different - an indie game, next social network beyond geo-location based photo-sharing, PaaS, IDE or another software development tool.&lt;/p&gt;

&lt;h2 id=&quot;chapter-two-my-case-history-first-record&quot;&gt;Chapter two. My case history first record.&lt;/h2&gt;

&lt;p&gt;And I wasn’t an exception. Historically, I have always been concerned that JavaScript, while being so popular, doesn’t have enough good tools comparing to other languages that I worked with. More than enough frameworks, but not enough tools. So my inner hipster made me write a software development tool. It was JavaScript tracing tool, called spy-js.&lt;/p&gt;

&lt;p&gt;The success of the tool was quick and even before I had a chance to digest it and make my inner hipster less hungry, spy-js was acquired by JetBrains. I have been offered to join WebStorm team to work on it full time as an independent contractor from home on the warm and sunny Gold Coast, Australia.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Life after spy-js acquisition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/cartman.jpg&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;chapter-three-changes-and-challenges&quot;&gt;Chapter three. Changes and challenges.&lt;/h2&gt;

&lt;p&gt;The change was huge for me. Regular shaving and pants wearing ceremonies quickly became a forgotten past. My top notch Lenovo ThinkPad was quickly and happily replaced by MacBook Pro, Windows by OSX, Ctrl by Cmd, cmd by terminal, Visual Studio by IntelliJ IDEA, and my long lasting love C# was replaced with at first supercilious Java.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Heading to MacDonald’s in my home outfit&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/workingFromHome.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Anyway, not just my inner hipster, but the inner hipster of my inner hipster and his inner hipster were happy. A Russian doll of happy hipsters. Or even a fractal of happy hipsters.&lt;/p&gt;

&lt;p&gt;Surely, big changes never come without some challenges. Not everyone can work from home. It takes discipline, concentration, motivation, dedication, and a few other words that end with “-tion”. I always knew I could do it and had some successful experience in past of working remotely. But during the first few months it was very unusual to get used to communicate with your team in realtime only within a tiny couple of hours frame allowed by our time zones.&lt;/p&gt;

&lt;p&gt;Thankfully, the majority of the challenges are easy to overcome when your relationship with your company is based on the mutual trust, and JetBrains is one of those awesome companies where many people working from different offices and homes all around the world, doing it happily and efficiently.&lt;/p&gt;

&lt;h2 id=&quot;chapter-four-when-it-all-not-just-ends-but-also-begins&quot;&gt;Chapter four. When it all not just ends but also begins&lt;/h2&gt;

&lt;p&gt;Another pleasant challenge was the nature of my new work. I have never been feeling comfortable strictly within the formal boundaries of a software developer duties. Apart from hacking together awesome stuff, I have always had a variety of interests in software development marketing, development process management, supporting users and advocating/evangelising certain things I strongly believe in, such as some software design and testing practices.&lt;/p&gt;

&lt;p&gt;With spy-js in WebStorm I had and totally used the great chance to do what covers the majority of my interests. I was able fully implement my ideas in the product, to write blog posts about it, to tweet about new features, to help users adopt it. I have been given a full trust and freedom to do whatever I think is good and bring it to the world with two (and upcoming third) major releases of WebStorm.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Always enjoyed growth hacking&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/growthHacker.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Of course, it took more than one person to make spy-js a successful, reliable and useful tool. I’d like to use the opportunity and thank everyone in my team who has participated in the tool ideas generation, development, testing, marketing, evangelising. And also you - software developers and users of spy-js for your kind words, help and feedback.&lt;/p&gt;

&lt;p&gt;The story could end here. Great idea, successful acquisition, nice product, joyful tears and everyone lived happily ever after. Not in my story. My inner hipster didn’t want to rest on his laurels. He woke up again and he’s hungry. But something has changed in him…&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To be continued in part two.&lt;/strong&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Wallaby.js hits version 1.0</title>
   <link href="http://dm.glhttp://dm.gl//2015/02/23/wallaby-version-one/"/>
   <updated>2015-02-23T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/02/23/wallaby-version-one</id>
   <content type="html">&lt;p&gt;Today we are proud to announce that &lt;a href=&quot;http://wallabyjs.com/&quot;&gt;wallaby.js&lt;/a&gt;, the smartest test runner for JavaScript, hits version one.&lt;/p&gt;

&lt;p&gt;New version is packed with new features and significant performance improvements, not to mention a few mercilessly exterminated bugs. Here is a list of the most important changes:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Node.js and io.js&lt;/strong&gt; testing support,&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;ES2015/ES6&lt;/strong&gt; support,&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;React JSX&lt;/strong&gt; dialect support,&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;JavaScript file configuration&lt;/strong&gt;,&lt;/li&gt;
  &lt;li&gt;Karma-like code &lt;strong&gt;preprocessors&lt;/strong&gt;,&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Require.js&lt;/strong&gt; support.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
&lt;img src=&quot;/assets/node.png&quot; class=&quot;small-image&quot; style=&quot;width: 200px&quot; /&gt;
&lt;img src=&quot;/assets/io.png&quot; class=&quot;small-image&quot; style=&quot;width: auto; height: 100px&quot; /&gt;
&lt;img src=&quot;/assets/es6.jpg&quot; class=&quot;small-image&quot; /&gt;
&lt;img src=&quot;/assets/react.png&quot; class=&quot;small-image&quot; /&gt;
&lt;img src=&quot;/assets/requirejs.png&quot; class=&quot;small-image&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;We have also added a couple of new useful context actions, added a few caching layers to our web server and sandbox to make the tests to even faster, made a few significant performance improvements and bug fixes, migrated wallaby.js internal engine from node.js to io.js, updated a few internally used libraries (such as acorn, lodash, escodegen).&lt;/p&gt;

&lt;h2 id=&quot;version-10-and-beyond&quot;&gt;Version 1.0 and beyond&lt;/h2&gt;
&lt;p&gt;Publicly released just few weeks ago, wallaby.js has already gained a great traction amongst JavaScript developers. As we know, many of you have already been happily using the tool for your daily jobs, helped and are helping us to make it better. Our team really appreciates your help, kind words and encouragement, we are dedicated to keep making your JavaScript development and testing experience better and better.&lt;/p&gt;

&lt;p&gt;As you also probably already know, wallaby.js updates itself automatically (with your permission) and is meant to be an ‘evergreen’ tool.&lt;/p&gt;

&lt;p&gt;So what does exactly version 1 mean, apart from all these new features?&lt;/p&gt;

&lt;p&gt;It basically means that we are now confident to recommend using the tool on everyday basis for your everyday work. By no means we are claiming wallaby.js totally bug-free, nor we’re freezing the existing set of features. Check out what’s on &lt;a href=&quot;http://wallabyjs.com/#plans&quot;&gt;our roadmap&lt;/a&gt; and please keep coming up with &lt;a href=&quot;https://github.com/wallabyjs/public/issues&quot;&gt;new ideas and suggestions&lt;/a&gt;. So the version number is just a formality to tell you that now, when our idea became a solid reality, &lt;strong&gt;we care even more about you and your experience with wallaby.js&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And the great news is that the tool is still free to use&lt;/strong&gt;. We are still working on the licensing and pricing policy and will announce it in advance, so you have enough time to make a decision about the purchase.&lt;/p&gt;

&lt;p&gt;Enough talk, let’s jump to the new features!&lt;/p&gt;

&lt;h2 id=&quot;nodejs-and-iojs&quot;&gt;Node.js and io.js&lt;/h2&gt;

&lt;p&gt;When we have just started developing wallaby.js, since we are using io.js internally, our dream was to use wallaby.js for developing wallaby.js. A few weeks ago, the dream came true, and today we excited to release node.js and io.js testing support for everyone.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/node.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;From what we know (correct us, if we are wrong, in comments), &lt;strong&gt;wallaby.js is the first and (for now) the only specialized continuous testing tool for node.js/io.js&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In order to use wallaby.js for testing your node.js code, just specify the environment type in your configuration file, and you are ready to go. Right now we support Mocha framework, feel free to create more framework feature requests in &lt;a href=&quot;https://github.com/wallabyjs/public/issues&quot;&gt;our public repository&lt;/a&gt;.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;files&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'lib/*.js'&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;

    &lt;span class=&quot;na&quot;&gt;tests&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'test/*Spec.js'&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;

    &lt;span class=&quot;na&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;// use 'node' type to use node.js or io.js&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'node'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;

      &lt;span class=&quot;c1&quot;&gt;// if runner property is not set, then wallaby.js&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;// embedded node/io.js version will be used&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;// runner: 'node or full path'&lt;/span&gt;

      &lt;span class=&quot;na&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;runner&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'--harmony --harmony_arrow_functions'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'ENV_PARAM1=true;ENV_PARAM2=false'&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;See more details &lt;a href=&quot;https://github.com/wallabyjs/public/#environment-setting&quot;&gt;in our documentation&lt;/a&gt;, check out &lt;a href=&quot;https://github.com/wallabyjs/wallaby-node-iojs-sample&quot;&gt;this sample repository&lt;/a&gt; with configuration to quickly get started.&lt;/p&gt;

&lt;h2 id=&quot;es6es2015harmony-react-jsx&quot;&gt;ES6/ES2015/Harmony, React JSX&lt;/h2&gt;
&lt;p&gt;Wallaby.js now supports ES6/ES2015 and JSX. ES6 is supported both natively for engines that can execute it and via
    code transpilers, such as Babel (former 6to5). You can see realtime coverage for your generators, classes, arrow
    functions and much more with wallaby.js. For JSX, not only wallaby.js understands its syntax, it also
    displays coverage inside JavaScript expressions within JSX elements.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/es6react.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Check out &lt;a href=&quot;https://github.com/wallabyjs/wallaby-react-todomvc-sample&quot;&gt;React sample repository&lt;/a&gt; or &lt;a href=&quot;https://github.com/wallabyjs/wallaby-es6-sample&quot;&gt;ES2015/ES6 sample repository&lt;/a&gt; with configuration to quickly get started.&lt;/p&gt;

&lt;h2 id=&quot;javascript-file-configuration-and-preprocessors&quot;&gt;JavaScript file configuration and preprocessors&lt;/h2&gt;
&lt;p&gt;Wallaby.js now supports JavaScript file configuration in addition to its existing JSON configuration, as well as Karma-like preprocessors. It means that now you can create files and tests lists dynamically or import them from your Karma config file. With preprocessors you can modify your source files content before feeding them to the test sandbox, synchronously or asynchronously.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;files&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'src/*.js'&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;

    &lt;span class=&quot;na&quot;&gt;tests&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'test/*Spec.js'&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;

    &lt;span class=&quot;na&quot;&gt;preprocessors&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'**/*.js'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'babel'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;sourceMap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;See more details &lt;a href=&quot;http://wallabyjs.com/docs/&quot;&gt;in our documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We encourage to use existing npm packages and write simple preprocessors without too much ceremony when possible, preprocessor functions however don’t have to be inline (or use ES6), &lt;strong&gt;feel free to encapsulate them anywhere, reuse, wrap and adapt karma plugins or other npm packages&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Over time we are planning to expose more and more extension points, but would like to do it carefully to keep wallaby.js public API as simple and clean as possible. In a meantime, Karma to Wallaby adapter could be a nice and interesting open source project.&lt;/p&gt;

&lt;h2 id=&quot;requirejs-support&quot;&gt;Require.js support&lt;/h2&gt;
&lt;p&gt;Last but not least, wallaby.js now supports require.js. The set up is similar to Karma, but easier. Please follow the instructions provided in &lt;a href=&quot;https://github.com/wallabyjs/wallaby-requirejs-sample&quot;&gt;this sample repository readme file&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That’s it for the blog post, thanks for reading and hope you enjoy using new wallaby.js features. More blog posts are coming the next few weeks, follow &lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;us on twitter&lt;/a&gt; to stay updated.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Testing angular.js application with wallaby.js</title>
   <link href="http://dm.glhttp://dm.gl//2015/02/16/wallaby-angular/"/>
   <updated>2015-02-16T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/02/16/wallaby-angular</id>
   <content type="html">&lt;p&gt;In case if you haven’t seen &lt;a href=&quot;http://wallabyjs.com/&quot;&gt;wallaby.js&lt;/a&gt; yet - it is an intelligent test runner for JavaScript, that runs your tests and displays the feedback as you write your code. Wallaby.js runs your tests very fast - it uses runtime dependency analysis to only execute tests affected by your code changes and parallel test execution.&lt;/p&gt;

&lt;p&gt;In this tutorial, I’ll demonstrate to how to set up wallaby.js for a typical angular.js project and use it in WebStorm. The same way you can also use it in PhpStorm, RubyMine, PyCharm or IntelliJ IDEA.&lt;/p&gt;

&lt;p&gt;First, open this angular.js todo mvc &lt;a href=&quot;https://github.com/wallabyjs/wallaby-angular-todomvc&quot;&gt;sample project&lt;/a&gt;. You can either clone the repository:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/wallabyjs/wallaby-angular-todomvc.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and open the project in WebStorm, or just open WebStorm and clone the repository right from the splash screen.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularSplashScreen.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularCheckout.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Second, download and install wallaby.js, if you haven’t already. To do that:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Download wallaby.js plugin &lt;a href=&quot;http://wallabyjs.com/#download&quot;&gt;from the website&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Install it by opening WebStorm settings dialog and using &lt;em&gt;Install plugin from disk&lt;/em&gt; button on &lt;em&gt;Plugins&lt;/em&gt; configuration page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularInstall.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next, we need to install the project dependencies. To do this, run:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;using your CLI, WebStorm built-in &lt;em&gt;Terminal&lt;/em&gt;, or just by right-clicking on the &lt;em&gt;package.json&lt;/em&gt; file in the project root folder and selecting &lt;em&gt;Run ‘npm install’&lt;/em&gt; action.&lt;/p&gt;

&lt;p&gt;Once all the dependencies have been installed, we need to create wallaby.js configuration file. All we need to do is to let wallaby.js know what source files it should track and where our tests are.&lt;/p&gt;

&lt;p&gt;Create &lt;em&gt;wallaby.js&lt;/em&gt; file in the project root folder and add the following content to it:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;files&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;pattern&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'node_modules/angular/angular.js'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;instrument&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;pattern&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'node_modules/angular-route/angular-route.js'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;instrument&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;pattern&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'node_modules/angular-mocks/angular-mocks.js'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;instrument&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'js/**/*.js'&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;tests&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;'test/unit/**/*.js'&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This means that wallaby.js should use angular.js from the installed &lt;em&gt;node_modules&lt;/em&gt;, track all source files located in &lt;em&gt;js&lt;/em&gt; folder and run all tests located in the &lt;em&gt;test/unit&lt;/em&gt; folder.&lt;/p&gt;

&lt;p&gt;Other configuration options and the full format of wallaby.js configuration file is &lt;a href=&quot;http://wallabyjs.com/docs/config/overview.html&quot;&gt;described in wallaby.js documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now we need to create wallaby.js &lt;em&gt;Run Configuration&lt;/em&gt;, that we will be using to start and stop wallaby.js. Select &lt;em&gt;Run&lt;/em&gt; menu, &lt;em&gt;Edit configurations&lt;/em&gt; and create new wallaby.js configuration.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularNewRc.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Give the configuration name you like and from the &lt;em&gt;Configuration file&lt;/em&gt; drop-down list, select the JSON file we have just created.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularNewRcConfig.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We are ready to go now - start the created configuration using &lt;em&gt;Run&lt;/em&gt; menu.&lt;/p&gt;

&lt;p&gt;When starting for the first time, wallaby.js will download and install some dependencies. Those include &lt;a href=&quot;http://nodejs.org/&quot;&gt;node.js&lt;/a&gt;, that is used to run wallaby.js, and &lt;a href=&quot;http://phantomjs.org/&quot;&gt;PhantomJs&lt;/a&gt; headless browser engine to run your tests in. The installation may take a minute or so and only happens once.&lt;/p&gt;

&lt;p&gt;After the start, wallaby.js displays its tool window at the bottom:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularToolWindow.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;and its status indicator at the right bottom corner of the window.&lt;/p&gt;

&lt;p&gt;The indicator displays a spinner when your tests are running, red icon if any of the tests is failing and green icon if all tests are passing. The tool window &lt;em&gt;Failing tests&lt;/em&gt; tab displays the information about failing tests, such as error stacks and failed expectation details.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularIndicator.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once started, you don’t need to restart wallaby.js run configuration to run your tests, as it does it automatically, as you change your code. You can even hide the tool window by using the &lt;em&gt;Hide icon&lt;/em&gt; in its right top corner, as you will be getting the information about failing tests right in the context of the code that you’re editing. You can always get the tool window back by clicking wallaby.js status indicator.&lt;/p&gt;

&lt;p&gt;So, let’s see wallaby.js in action. Open one of the application source files, for example angular.js controller &lt;em&gt;todoCtrl.js&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularFile.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When wallaby.js is up and running, you should be able to see coverage indicators in the gutter of the code editor.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularEditor.png&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Gray square means that the source line is not covered by any of your tests.&lt;/li&gt;
  &lt;li&gt;Green square means that the source line is covered by at least one of your tests.&lt;/li&gt;
  &lt;li&gt;Yellow square means that the source line is only partially covered by some of your tests.&lt;/li&gt;
  &lt;li&gt;Red square means that the source line is the source of an error or failed expectation, or is in the stack of an error.&lt;/li&gt;
  &lt;li&gt;Pink square means that the source line is on the execution path of a failing test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On any line of the source code you can hit &lt;em&gt;Alt + Enter&lt;/em&gt; (or use the light bulb icon) and display wallaby.js context actions. You can read more about all actions &lt;a href=&quot;http://wallabyjs.com/docs/intro/get-started-jetbrains.html#context-actions&quot;&gt;in the documentation&lt;/a&gt;. For this example, let’s see all uncovered regions of the source file that we have opened.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularContext.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We can now clearly see what is exactly not covered inside the line with the yellow coverage indicator, because wallaby.js tracks coverage for logical expressions and conditional operators as well.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularUncovered.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now, let’s see what tests are covering the source file. To do that, on any line hit &lt;em&gt;Alt + Enter&lt;/em&gt; and select the &lt;em&gt;Show line test(s)&lt;/em&gt; action.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularShowTests.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Tests window is displayed and all the tests that are covering this line of code are displayed inside. If any of the tests is failing, then full error stacks and expectation errors are displayed as well.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularCoveringTests.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The window is searchable with &lt;em&gt;Ctrl/Cmd + F&lt;/em&gt; and all the links inside it can be clicked using your mouse or used from the keyboard with &lt;em&gt;Ctrl/Cmd + B&lt;/em&gt; shortcut. You can hide the window by hitting &lt;em&gt;Esc&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;While inside the window, let’s navigate to one of the covering tests by using the link next to the test full name.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularTest.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The test is checking that if we change some todo item title to be an empty string, then, when saving items, the item with empty title should be removed. Now let’s change the expectation code to see how wallaby.js reacts.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularTestRed.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Immediately as we do so, wallaby.js displays the expectation error right where it occurs. The test path line indicators become pink, the source of the error line indicator is now red.&lt;/p&gt;

&lt;p&gt;Apart from displaying errors where and when they occur, wallaby.js also displays console.log output in a similar manner, so if you’re a fan of console.log, you are going to love what you see next:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularConsoleLog.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We pass todo object to the console.log and we can immediately see the result. You can output anything and anywhere this way, to quickly inspect the objects that you’re interested in.&lt;/p&gt;

&lt;p&gt;Some objects or errors may contain large amount of data, that is not viewable inline. To inspect the full message, you can always use &lt;em&gt;Alt + Enter&lt;/em&gt; and invoke &lt;em&gt;Show line test(s)&lt;/em&gt; action to see the full output in the context of some source code or a test that you are interested in.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularTestDetails.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, let’s get back to the controller source file &lt;em&gt;todoCtrl.js&lt;/em&gt;, find some uncovered function and write a test for it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularUncoveredToCover.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For example, let’s cover &lt;em&gt;removeTodo&lt;/em&gt; function with a test. To do that, I will add a new test to one of the existing test files. In the test, I will get one of the pre-created todo items, pass it to the &lt;em&gt;removeTodo&lt;/em&gt; function and ensure that the total number of the items has decreased by one.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/wallabyAngularAction.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;That’s it for the blog post, thanks for reading and hope it helps you to get started with wallaby.js in your project. Follow &lt;a href=&quot;https://twitter.com/wallabyjs&quot;&gt;us on twitter&lt;/a&gt; to stay updated.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Wallaby.js - unleash the full power of your tests</title>
   <link href="http://dm.glhttp://dm.gl//2015/01/30/wallaby/"/>
   <updated>2015-01-30T00:00:00+00:00</updated>
   <id>http://dm.gl/2015/01/30/wallaby</id>
   <content type="html">&lt;p&gt;Many JavaScript developers understand the importance of writing tests and do use them. There are a few testing frameworks and test runners available in JavaScript land. Some of them are even nicely integrated into some code editors. For example, there’s a nice integration of Karma runner in WebStorm. There are some automated testing workflows, where you can enjoy your tests’ feedback after a few seconds or so (depending on the size of your codebase).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How we use our JavaScript tests&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/testsUsed.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The issue is that an &lt;strong&gt;average JavaScript codebase size is growing&lt;/strong&gt;. We write and test more JavaScript code, but at the same time we want to run our tests faster, because faster feedback means better control over the growing codebase. But &lt;strong&gt;when we have hundreds and thousands of tests, even relatively fast ones, it becomes quite a burden to run them frequently&lt;/strong&gt;, as we write our code.  Yes, we’re still running them all as a part of our CI build, we’re inspecting generated coverage reports, we’re using various cloud and on-premises solutions to run our JavaScript tests in different browsers and on different devices. But it doesn’t help us where we’re spending the most of our time - when we are writing the bulk of our application logic.&lt;/p&gt;

&lt;p&gt;Each good test we write adds some value, and, &lt;a href=&quot;http://dm.gl/2014/11/10/JavaScript-tests-cost-efficiency/&quot;&gt;in JavaScript, tests are more than just recorded assumptions&lt;/a&gt;, But &lt;strong&gt;we are not using our tests full potential&lt;/strong&gt;. They can do much better job than they are doing now. They can run on every key stroke and provide some helpful feedback, immediately highlight found issues in the code that you’re writing. But when we run them all and sequentially - we can’t have it. &lt;strong&gt;It’s like having a sports car and only driving it once a day and within a school zone speed limits&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unleash the full power of your tests&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/tests.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In &lt;a href=&quot;http://wallabyjs.com&quot;&gt;wallaby.js&lt;/a&gt;, I have decided to tackle these issues and build an intelligent test runner, that allows you to exploit the full power of your tests.&lt;/p&gt;

&lt;p&gt;First, &lt;strong&gt;code coverage is not an option - it’s the must have&lt;/strong&gt;. But that’s &lt;strong&gt;not those boring numbers&lt;/strong&gt; of coverage percentage I am talking about. When I am writing my code and tests, I don’t care whether I have 89% or 91% percent of my code covered. I don’t want to know if it’s a statement coverage or a condition coverage, when I’m typing my function code. I just want to see &lt;strong&gt;coverage indicators right when and where I’m editing my code&lt;/strong&gt; and without too much distraction.&lt;/p&gt;

&lt;p&gt;Second, if I am editing a single test or a function that I know is only covered by a few tests, why my test runner can’t know about it and use the knowledge? I just want it to &lt;strong&gt;run everything that depends on my change, everything that may change its behaviour after my change - no more, no less&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Third, if my change requires a lot of tests to be executed and my test files are independent (and they should be), I want to use the full power of my machine and &lt;strong&gt;run tests in parallel&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Wallaby.js design is based on the simple principles listed above and is focused on improving your everyday and every minute code writing experience. &lt;strong&gt;Inline error/console messages and expectation failures, where and when they occur, test execution screenshots&lt;/strong&gt;, context actions - these are just few things wallaby.js provides to make you more productive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With wallaby.js, there’s no longer a wall between you and the full power of your tests. Go ahead, &lt;a href=&quot;http://wallabyjs.com/#download&quot;&gt;install wallaby.js&lt;/a&gt; and release the beast from its cage.&lt;/strong&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>JavaScript backdoor debugging</title>
   <link href="http://dm.glhttp://dm.gl//2014/11/14/JavaScript-backdoor-debugging/"/>
   <updated>2014-11-14T00:00:00+00:00</updated>
   <id>http://dm.gl/2014/11/14/JavaScript-backdoor-debugging</id>
   <content type="html">&lt;p&gt;Sometimes I put “console.log” in my JavaScript code just to inspect some latest object values in some deeply nested scopes of my application. Quite often I realise that one “console.log” isn’t enough, so I add more, and so forth. Occasionally I need to modify some objects in the code that I’m tracing on the fly, right from the console, but I don’t have an access to the scope that I’d like to alter.&lt;/p&gt;

&lt;p&gt;To address the above listed issues, I sometimes use a simple debugging technique, that I call backdoor debugging. The idea is very simple: instead of (or in addition to) putting one or more “console.log” statements into some nested function scope(s), I am creating a closure in the deepest scope. The closure is doing just one thing: evaluating whatever code is passed into it. For example:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;totalNumberOfDrinks&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;totalNumberOfCodeLines&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;programmer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;writeCode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;totalNumberOfCodeLines&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

    &lt;span class=&quot;na&quot;&gt;drinkCoffee&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;totalNumberOfDrinks&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

    &lt;span class=&quot;na&quot;&gt;isSleepy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;backdoor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;my&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;eval&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);});&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;programmer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;isSleepy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;programmer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;drinkCoffee&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;codeWritingInterval&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;setInterval&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;programmer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;writeCode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;})();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The code is pretty simple: IIFE initializes a couple of variables (that I don’t have an access to from the global scope) and creates a “programmer” object. The programmer drinks coffee if sleepy and then starts writing some code - sounds familiar, doesn’t it?&lt;/p&gt;

&lt;p&gt;I have also placed the “backdoor” named “my” inside “isSleepy” function, so now I can run arbitrary code with access to the “isSleepy” function and all scopes it is nested in. Let’s open console and have some fun. For example I can query how many lines of code have the programmer wrote so far, or even forever stop the programmer from writing code (sounds terrible though).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/backdoor.png&quot; alt=&quot;backdoor in action&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The backdoor function is extremely simple. You can grab the source code from the &lt;a href=&quot;https://github.com/ArtemGovorov/backdoor&quot;&gt;backdoor.js repository&lt;/a&gt;. Any ideas about how to make it even more simple or extend it are welcome.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>JavaScript tests cost efficiency</title>
   <link href="http://dm.glhttp://dm.gl//2014/11/10/JavaScript-tests-cost-efficiency/"/>
   <updated>2014-11-10T00:00:00+00:00</updated>
   <id>http://dm.gl/2014/11/10/JavaScript-tests-cost-efficiency</id>
   <content type="html">&lt;p&gt;Everything has its price. Adding a new feature, maintaining an existing one, writing tests. When you are writing and maintaining tests in C# or Java, you are getting recorded and executable scenarios with your assumptions for that price. What about JavaScript, are you getting exactly the same?&lt;/p&gt;

&lt;p&gt;Let’s imagine that in the code below, I have covered the “try” block in my tests, but didn’t bother covering “catch” block as I thought it is trivial and not worth testing.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-js&quot; data-lang=&quot;js&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;myService&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
  &lt;span class=&quot;s1&quot;&gt;'doWork'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'error'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;s1&quot;&gt;'cancelWork'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{},&lt;/span&gt;
  &lt;span class=&quot;s1&quot;&gt;'handleError'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{},&lt;/span&gt;
  &lt;span class=&quot;s1&quot;&gt;'stoр'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;myService&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;doWork&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;myService&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cancelWork&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;myService&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hanldeError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  
  &lt;span class=&quot;nx&quot;&gt;myService&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;stop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;How many problems did I miss? Simple code editor will find nothing. Careful reader may find one or two issues. Intelligent code editor with nice static analysis and spell checker may find all three, though there are many cases when it won’t help either as static analysis capabilities in the dynamic world of JavaScript are limited. Test will find all three errors just as a free addition to its main duty.&lt;/p&gt;

&lt;p&gt;So in case if you are still looking for more reasons to cover your JavaScript code, here is one more - &lt;strong&gt;JavaScript tests are more cost efficient than in C# or Java, because for the same price you are also getting some form of a compiler for your code&lt;/strong&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Tools vs. Frameworks</title>
   <link href="http://dm.glhttp://dm.gl//2014/11/03/tools-vs-frameworks/"/>
   <updated>2014-11-03T00:00:00+00:00</updated>
   <id>http://dm.gl/2014/11/03/tools-vs-frameworks</id>
   <content type="html">&lt;p&gt;How many times did you wish there was a good tool for some web programming/testing related task and you couldn’t find one? Now how frequently an average JavaScript developer needs a new framework with some features that are not already present anywhere else? And yet, the next OSS project that developer will start is going to be a framework not a tool.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/horse_js_no_frameworks.png&quot; alt=&quot;Horse_js on frameworks&quot; /&gt;&lt;/p&gt;

&lt;p&gt;While not necessarily a bad thing, why does it happen? One may say that &lt;strong&gt;good tools are hard to create. Well, so as good frameworks&lt;/strong&gt;. Your thoughts?&lt;/p&gt;
</content>
 </entry>
 

</feed>
