Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alexandra Rogova
jio_mebibou
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
Show 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 @@
...
@@ -220,8 +220,8 @@
}(
window
,
WeakMap
,
ArrayBuffer
,
Uint8Array
));
}(
window
,
WeakMap
,
ArrayBuffer
,
Uint8Array
));
var
XMLHttpRequest
=
global
.
XMLHttpRequest
||
module
.
exports
,
global
.
XMLHttpRequest
=
module
.
exports
;
Blob
=
window
.
Blob
,
var
Blob
=
window
.
Blob
,
atob
=
window
.
atob
,
atob
=
window
.
atob
,
btoa
=
window
.
btoa
,
btoa
=
window
.
btoa
,
FileReader
=
window
.
FileReader
,
FileReader
=
window
.
FileReader
,
...
...
test/node/node-require.js
View file @
b53e74be
...
@@ -21,15 +21,14 @@
...
@@ -21,15 +21,14 @@
(
function
(
require
,
global
,
Object
)
{
(
function
(
require
,
global
,
Object
)
{
"
use strict
"
;
"
use strict
"
;
var
sinon
=
require
(
'
./sinon-require
'
),
var
sinon
,
jIO
;
global
.
sinon
=
sinon
;
global
.
XMLHttpRequest
=
sinon
.
FakeXMLHttpRequest
;
jIO
=
require
(
'
../../dist/jio-latest-node
'
);
jIO
=
require
(
'
../../dist/jio-latest-node
'
);
global
.
jIO
=
jIO
;
global
.
jIO
=
jIO
;
Object
.
keys
(
jIO
.
node_env
).
forEach
(
function
(
key
)
{
Object
.
keys
(
jIO
.
node_env
).
forEach
(
function
(
key
)
{
global
[
key
]
=
jIO
.
node_env
[
key
];
global
[
key
]
=
jIO
.
node_env
[
key
];
});
});
sinon
=
require
(
'
./sinon-require
'
);
global
.
sinon
=
sinon
;
}(
require
,
global
,
Object
));
}(
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