0.3.0 • Published 7 years ago

ngx-zombie-compiler v0.3.0

Weekly downloads
33
License
MIT
Repository
github
Last release
7 years ago

ngx-zombie-compiler

wercker status npm version dependencies Status Greenkeeper badge GitHub license

Fast JiT compiler for Angular unit testing.

Install

npm install ngx-zombie-compiler -D

or

yarn add ngx-zombie-compiler -D

Usage

To use the compiler provided by this module, you need to configure it using TestBed.configureCompiler. If you use angular-cli, you can edit src/test.ts.

// First, import ZOMBIE_COMPILER_PROVIDERS
import { ZOMBIE_COMPILER_PROVIDERS } from 'ngx-zombie-compiler';

// :

// Second, configure TestBed's compiler
beforeEach(() => {
  getTestBed().configureCompiler({
    providers: ZOMBIE_COMPILER_PROVIDERS,
  });
});

Why?

By the default, TestingCompiler provided by Angular compiles all modules by each spec and compiling modules makes your test heavy. In mane cases, we can turn use the compiled result, so this module provide another JiT compiler which outlives default JiT compiler and reuses the compiled result. So using this, you can reduce the total execution time to run unit testing.

If you want details, please see my gist.

License

MIT

0.3.0

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago