Introduction: How does it work?

Plugin and Core

Wallaby.js editor integration consists of two major parts: code editor integration and a local background server (which we call core). The code editor part is written in the language used by the editor itself, while the core is written in JavaScript and uses node.js.

Whenever a tracked source file changes, code editor sends the diff to the server. The local server has a cache of all the source files; it applies the diff and runs the affected tests.

Wallaby.js core tracks dependencies between your files and tests using a mix of common sense and some dark magic. On a serious note, it’s a combination of runtime analysis powered by the code instrumentation and lots of tricky heuristics.

Whenever possible, wallaby.js tries to run your tests in parallel. The degree of parallelism used to run your tests can be configured using workers setting.

Wallaby.js cache

Wallaby.js core uses its snapshot of all the source files to run tests. This is an important thing to remember when you are writing a wallaby.js plugin or tests that need to access the file system. The exception is the node_modules folder: wallaby.js doesn’t copy it to its cache (unless you specifically reference some of the node_modules files in your files list), but just uses your project local version.

Feel free to ask any questions via email or in the comments section below.