-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a699079
commit 523a5f7
Showing
20 changed files
with
206 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"plugins": [ | ||
"add-module-exports", | ||
"transform-es2015-modules-commonjs", | ||
"transform-es2015-destructuring", | ||
"transform-object-rest-spread", | ||
["transform-react-jsx", { "pragma": "h" }] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
// http://eslint.org/docs/rules/ | ||
"root": true, | ||
"parser": "babel-eslint", | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": 7, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": [1, { "pragma": "h" }], | ||
"globalReturn ": true, | ||
"impliedStrict": true | ||
} | ||
}, | ||
"env": { | ||
"browser": true, | ||
"mocha": true, | ||
"node": true, | ||
"es6": true | ||
}, | ||
"rules": { | ||
"semi": 0, | ||
"no-var": 0, | ||
"vars-on-top": 0, | ||
"spaced-comment": 0, | ||
"prefer-template": 0, | ||
"no-unused-vars": 0, | ||
"no-inner-declarations": 0, | ||
"consistent-return": 0, | ||
"comma-dangle": 0, | ||
"no-use-before-define": 0, | ||
"no-return-assign": 0, | ||
"no-console": 0, | ||
"max-len": 0, | ||
"arrow-body-style": 0, | ||
"new-cap": 0, | ||
"quotes": 0, | ||
"quote-props": 0, | ||
"prefer-arrow-callback": 0, | ||
"func-names": 0, | ||
"padded-blocks": 0, | ||
"keyword-spacing": 0, | ||
"no-global-assign": 0, | ||
"no-trailing-spaces": 0, | ||
"no-unused-expressions": 0, | ||
"space-before-function-paren": 0, | ||
"global-require": 0, | ||
"react/jsx-no-bind": 0, | ||
"react/jsx-space-before-closing": 0, | ||
"react/jsx-closing-bracket-location": 0, | ||
"react/prop-types": 0, | ||
"react/prefer-stateless-function": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* eslint-disable */ | ||
var jsdom = require('jsdom'); | ||
|
||
// Setup the jsdom environment | ||
// @see https://github.com/facebook/react/issues/5046 | ||
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>'); | ||
global.window = document.defaultView; | ||
global.navigator = global.window.navigator; | ||
global.usingJSDOM = true; | ||
|
||
global.chai = require('chai'); | ||
global.expect = global.chai.expect; | ||
global.SVGElement = global.Element; | ||
|
||
//JSDOM doesn't support localStorage by default, so lets just fake it.. | ||
if (!global.window.localStorage) { | ||
global.window.localStorage = { | ||
getItem() { return '{}'; }, | ||
setItem() {} | ||
}; | ||
} | ||
|
||
// take all properties of the window object and also attach it to the | ||
// mocha global object | ||
propagateToGlobal(global.window); | ||
|
||
// from mocha-jsdom https://github.com/rstacruz/mocha-jsdom/blob/master/index.js#L80 | ||
function propagateToGlobal (window) { | ||
for (var key in window) { | ||
if (!window.hasOwnProperty(key)) continue; | ||
if (key in global) continue; | ||
|
||
global[key] = window[key]; | ||
} | ||
} | ||
if (!global.requestAnimationFrame) { | ||
global.requestAnimationFrame = function (func) { | ||
setTimeout(func, 1000 / 60); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
-r babel-register | ||
--require ./DOM.js | ||
--recursive | ||
--colors | ||
|
||
test/**/*.js | ||
test/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.