Luke Childs
248aa9b101
node => Node.js
8 years ago
Luke Childs
089f7c94f0
Remove node >4 features
8 years ago
Luke Childs
2d0fbec36f
Add detailed comments
8 years ago
Luke Childs
ce32645a0b
Create reusable function for creating window object
8 years ago
Luke Childs
477271dff4
Don't use truthy check to see if globals exist
8 years ago
Luke Childs
4a5c6343b5
Use existing module to clone objects instead of rolling our own
This one handles Date objects and other more complex data structures
8 years ago
Luke Childs
5dfb5da86c
Simplify argument type checks
8 years ago
Luke Childs
f6b5e9ff3b
Don't use jsdom private API features to get global properties
Before we were manually grabbing `window._core` which was a bit of a hack. This sets the correct settings to allow us to get all globals with `Object.getOwnPropertyNames(window)`.
We also need to clone the settings object before passing it to jsdom otherwise it tacks loads of stuff on to the referenced object.
8 years ago
Luke Childs
2cea73d0cf
Update the way we get properties to work with latest jsdom
9 years ago
Luke Childs
785df853de
Allow args to be passed through in any order
9 years ago
Luke Childs
699f45c292
Allow jsdom config options to be passed through
9 years ago
Luke Childs
9ca08b2bdd
Always overwrite globals but don't overwrite node globals
9 years ago
Luke Childs
f99fffb1a2
Remove parenthesis around single arg arrow function
9 years ago
Luke Childs
b3b707278b
Move advanced settings into config object
9 years ago
Luke Childs
f26061d836
Add overwrite arg
9 years ago
Luke Childs
7ef7991589
Add move ifs out into filter methods
9 years ago
Luke Childs
68ab0bafe6
Add param to choose globals
9 years ago
Luke Childs
5277f37c5d
Don't make window global until loop
9 years ago
Luke Childs
b6607501fb
ES6
9 years ago
Luke Childs
d00ac454c2
Invoke strict mode
9 years ago
Luke Childs
d7593ec998
Wrap module in function
9 years ago
Luke Childs
dfe6458852
Check property is undefined not just falsey
9 years ago
Luke Childs
253edbd1c0
Remove arrow function
9 years ago
Luke Childs
26f1022666
Add functionality
9 years ago