Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
jio
Commits
b53e74be
Commit
b53e74be
authored
Mar 09, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[jio] Fix XMLHttpRequest global
sinon now correctly replace it only on demand.
parent
f9cfbc47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
src/node/jio-compat.js
src/node/jio-compat.js
+2
-2
test/node/node-require.js
test/node/node-require.js
+5
-6
No files found.
src/node/jio-compat.js
View file @
b53e74be
...
...
@@ -220,8 +220,8 @@
}(
window
,
WeakMap
,
ArrayBuffer
,
Uint8Array
));
var
XMLHttpRequest
=
global
.
XMLHttpRequest
||
module
.
exports
,
Blob
=
window
.
Blob
,
global
.
XMLHttpRequest
=
module
.
exports
;
var
Blob
=
window
.
Blob
,
atob
=
window
.
atob
,
btoa
=
window
.
btoa
,
FileReader
=
window
.
FileReader
,
...
...
test/node/node-require.js
View file @
b53e74be
...
...
@@ -21,15 +21,14 @@
(
function
(
require
,
global
,
Object
)
{
"
use strict
"
;
var
sinon
=
require
(
'
./sinon-require
'
),
jIO
;
global
.
sinon
=
sinon
;
global
.
XMLHttpRequest
=
sinon
.
FakeXMLHttpRequest
;
jIO
=
require
(
'
../../dist/jio-latest-node
'
);
var
sinon
,
jIO
=
require
(
'
../../dist/jio-latest-node
'
);
global
.
jIO
=
jIO
;
Object
.
keys
(
jIO
.
node_env
).
forEach
(
function
(
key
)
{
global
[
key
]
=
jIO
.
node_env
[
key
];
});
sinon
=
require
(
'
./sinon-require
'
);
global
.
sinon
=
sinon
;
}(
require
,
global
,
Object
));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment