Supported technologies: Angular, Angular CLI

Angular CLI

If you are using Angular CLI, we recommend have a look into this example for a ready-to-go configuration example.


If you have Jest CLI configured for your Angular project and want to run Wallaby, you may use the config below:

module.exports = function (wallaby) {

  return {
    files: [

    tests: ['src/**/*.spec.ts'],

    env: {
      type: 'node',
      runner: 'node'

    compilers: {
      '**/*.ts?(x)': wallaby.compilers.typeScript({
        module: 'commonjs',
        getCustomTransformers: () => {
          return {before: [require('jest-preset-angular/InlineHtmlStripStylesTransformer').factory({compilerModule: require('typescript')})]};
      '**/*.html': file => ({
        code: require('ts-jest').process(file.content, file.path, {globals: {'ts-jest': {stringifyContentPathRegex: '\\.html$'}}}),
        map: {version: 3, sources: [], names: [], mappings: []},
        ranges: []

    preprocessors: {
      'src/**/*.js': [
        file => require('@babel/core').transform(file.content, {
          sourceMap: true, compact: false, filename: file.path,
          presets: [require('babel-preset-jest')]

    setup: function(wallaby) {
      let jestConfig = require("./package.json").jest;
      delete jestConfig.preset;
      jestConfig = Object.assign(require("jest-preset-angular/jest-preset"), jestConfig);

    testFramework: 'jest'

If you are setting up Jest from the scratch for your Angular project, please read this blog post.

AngularJS 1.x

You may find a very detailed step by step angular.js 1.x tutorial in our blog. The source code for the blog post is available in this repository.

Another good example of using AngularJS 1.5 with ES6, Webpack & Wallaby is available in this skeleton repository.


AngularJS 1.x templates to JavaScript

If you are looking for the way to compile your AngularJS templates to JavaScript with wallaby.js for your tests, you may have a look at wallaby-ng-html2js-preprocessor preprocessor.

AngularJS 1.x files sorting

If you are looking for the way to sort your source files (due to Angular dependencies between them), so that you could use glob patterns in your config files list as opposed to listing your source files one by one, you may have a look at wallaby-angular-filesort postprocessor.

System.js notes

If you are using Angular >=2 with System.js, have a look into the docs section for some useful configuration hints. You also may find some configuration examples for Angular >=2 below.