Skip to content

Instantly share code, notes, and snippets.

@sharpdressedcodes
Created February 23, 2017 00:06
Show Gist options
  • Select an option

  • Save sharpdressedcodes/47480ed7ac6272d1c2ed91fda14843f9 to your computer and use it in GitHub Desktop.

Select an option

Save sharpdressedcodes/47480ed7ac6272d1c2ed91fda14843f9 to your computer and use it in GitHub Desktop.
wallaby config file for homes-site
process.env.BABEL_ENV = 'test';
module.exports = function(wallaby){
return {
files: [
{pattern: 'node_modules/babel-polyfill/dist/polyfill.js', instrument: false},
'test/mock/*.js',
'stubs/*.js',
'test/test-util/*.js',
'app/**/*.js',
'app/**/*.jsx'
],
tests: [
'test/**/*Spec.js'
],
env: {
type: 'node',
runner: 'node'
},
compilers: {
'**/*.js': wallaby.compilers.babel(),
'**/*.jsx': wallaby.compilers.babel()
},
debug: true,
testFramework: 'mocha',
setup: function(wallaby){
var jsdom = require('jsdom').jsdom;
var chai = require('chai');
var sinon = require('sinon');
var sinonChai = require('sinon-chai');
var sinonAsPromised = require('sinon-as-promised');
require('babel-polyfill');
chai.use(sinonChai);
global.document = jsdom('<!doctype html><html><body></body></html>');
global.window = document.defaultView;
global.navigator = global.window.navigator;
global.expect = chai.expect;
global.sinon = sinon;
//var mocha = wallaby.testFramework;
//mocha.ui('bdd');
}
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment