wallaby/node.js
/**
 * Setup a correct Wallaby settings based on a given convention. All settings are overridable through
 * the settings callback
 * @param {Wallaby~settingsCallback} settingsCallback Callback for working with the wallaby settings object
 * @param {Wallaby~setupCallback} setupCallback Callback for doing additional setup of Wallaby
 */
Setup a correct Wallaby settings based on a given convention. All settings are overridable through
the settings callback
@param {Wallaby~settingsCallback} settingsCallback Callback for working with the wallaby settings object
@param {Wallaby~setupCallback} setupCallback Callback for doing additional setup of Wallaby
Setup a correct Wallaby settings based on a given convention . All settings are overridable through the settings callback @param { Wallaby~settingsCallback } settingsCallback Callback for working with the wallaby settings object @param { Wallaby~setupCallback } setupCallback Callback for doing additional setup of Wallaby
function node(settingsCallback, setupCallback) {
    return (wallaby) => {
        let babelCompiler = wallaby.compilers.babel(babelConfig);
        var settings = {
            files: [
                { pattern: 'node_modules/chai/chai.js', instrument: false },
                { pattern: 'node_modules/chai-as-promised/chai-as-promised.js', instrument: false },
                { pattern: 'node_modules/sinon/pkg/sinon.js', instrument: false },
                { pattern: 'node_modules/sinon-chai/lib/sinon-chai.js', instrument: false },
                { pattern: 'Source/**/for_*/**/*.js', ignore: true },
                { pattern: 'Source/**/dist/**/*.js', ignore: true },
                { pattern: 'Source/**/*.js' }
            ],
            tests: [
                { pattern: 'Source/**/dist/**/for_*/**/*.js', ignore: true },
                { pattern: 'Source/**/for_*/**/*.js' }
            ],
            testFramework: 'mocha',
            compilers: {
                '**/*.js': babelCompiler
            },
            env: {
                type: 'node'
            },
            setup: getSetupFunction(setupCallback)
        };
        if (typeof settingsCallback === 'function') settingsCallback(settings);
        return settings;
    };
}
function node ( settingsCallback , setupCallback ) { return ( wallaby ) => { let babelCompiler = wallaby . compilers . babel ( babelConfig ) ; var settings = { files : [ { pattern : 'node_modules/chai/chai.js' , instrument : false } , { pattern : 'node_modules/chai-as-promised/chai-as-promised.js' , instrument : false } , { pattern : 'node_modules/sinon/pkg/sinon.js' , instrument : false } , { pattern : 'node_modules/sinon-chai/lib/sinon-chai.js' , instrument : false } , { pattern : 'Source/**/for_*/**/*.js' , ignore : true } , { pattern : 'Source/**/dist/**/*.js' , ignore : true } , { pattern : 'Source/**/*.js' } ] , tests : [ { pattern : 'Source/**/dist/**/for_*/**/*.js' , ignore : true } , { pattern : 'Source/**/for_*/**/*.js' } ] , testFramework : 'mocha' , compilers : { '**/*.js' : babelCompiler } , env : { type : 'node' } , setup : getSetupFunction ( setupCallback ) } ; if ( typeof settingsCallback === 'function' ) settingsCallback ( settings ) ; return settings ; } ; }
Setup a correct Wallaby settings based on a given convention.
Setup a correct Wallaby settings based on a given convention .