ngx-wallaby-jest

Make wallaby working with jest and angular

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
ngx-wallaby-jest
500.0.25 years ago6 years agoMinified + gzip package size for ngx-wallaby-jest in KB

Readme

Integrate wallaby with jest and angular!
npm GitHub npm
CircleCI
With the use of jest-preset-angular ' we can run our angular test through jest. But we still have a nice tool named: wallabyjs. With this plugin you can add jest to your angular implementation
Described implementation: Angular + Jest + Wallabyjs why it is the ideal combination! And how to configure
Example: angular-cli-jest-wallaby

How to use

`npm install ngx-wallaby-jest`

Example configuration file

```` const ngxWallabyJest = require('ngx-wallaby-jest');
module.exports = function (wallaby) {
return {
    files: [
        {pattern: 'tsconfig.json', load: false},
        {pattern: 'jest.config.js', load: false},
        {pattern: 'src/setupJest.ts', load: false},
        {pattern: 'src/tsconfig.spec.json', load: false},
        {pattern: 'src/app/**/*.ts', load: false},
        {pattern: 'test/**/*.ts', load: false},
        {pattern: 'spec-bundle-wallaby.js', load: false},
        {pattern: 'src/app/**/*.spec.ts', ignore: true},
        {pattern: 'src/app/**/*.d.ts', ignore: true},
    ],
    tests: ['src/app/**/*.spec.ts'],
    env: {
        kind: 'electron',
        type: 'node',
        runner: 'node'
    },
    preprocessors: {
        'src/**/*.ts': ngxWallabyJest,
    },
    testFramework: 'jest',
    setup: function (wallaby) {
        var jestConfig = require('./jest.config.js');
        // jestConfig.globals = { "__DEV__": true };
        wallaby.testFramework.configure(jestConfig);
    },
    debug: true
};
}; ```