-
Notifications
You must be signed in to change notification settings - Fork 64
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
Showing
34 changed files
with
1,806 additions
and
1,690 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
'use strict'; | ||
'use strict' | ||
|
||
const { JSDOM } = require('jsdom'); | ||
const { configure } = require('enzyme'); | ||
const Adapter = require('enzyme-adapter-react-16'); | ||
const { JSDOM } = require('jsdom') | ||
const { configure } = require('enzyme') | ||
const Adapter = require('enzyme-adapter-react-16') | ||
|
||
configure({ adapter: new Adapter() }); | ||
configure({ adapter: new Adapter() }) | ||
|
||
const jsdom = new JSDOM('<!doctype html><html><body></body></html>'); | ||
const { window } = jsdom; | ||
const jsdom = new JSDOM('<!doctype html><html><body></body></html>') | ||
const { window } = jsdom | ||
|
||
function copyProps(src, target) { | ||
const props = Object.getOwnPropertyNames(src) | ||
.filter(prop => typeof target[prop] === 'undefined') | ||
.reduce((result, prop) => ({ | ||
...result, | ||
[prop]: Object.getOwnPropertyDescriptor(src, prop), | ||
}), {}); | ||
Object.defineProperties(target, props); | ||
const props = Object.getOwnPropertyNames(src) | ||
.filter((prop) => typeof target[prop] === 'undefined') | ||
.reduce( | ||
(result, prop) => ({ | ||
...result, | ||
[prop]: Object.getOwnPropertyDescriptor(src, prop), | ||
}), | ||
{}, | ||
) | ||
Object.defineProperties(target, props) | ||
} | ||
|
||
global.window = window; | ||
global.document = window.document; | ||
global.window = window | ||
global.document = window.document | ||
global.navigator = { | ||
userAgent: 'node.js', | ||
}; | ||
userAgent: 'node.js', | ||
} | ||
|
||
copyProps(window, global); | ||
copyProps(window, global) | ||
|
||
global.__DEV__ = true; | ||
global.__DEV__ = true |
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,5 +1,5 @@ | ||
'use strict'; | ||
'use strict' | ||
|
||
// Set this flag so that ts-node can load the declarations | ||
process.env.TS_NODE_FILES = true; | ||
process.env.TS_NODE_PROJECT = '../../tsconfig.test.json'; | ||
process.env.TS_NODE_FILES = true | ||
process.env.TS_NODE_PROJECT = '../../tsconfig.test.json' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
'use strict'; | ||
'use strict' | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./build/classname.production.min.js'); | ||
module.exports = require('./build/classname.production.min.js') | ||
} else { | ||
module.exports = require('./build/classname.development.js'); | ||
module.exports = require('./build/classname.development.js') | ||
} |
Oops, something went wrong.