mirror of
https://github.com/morten-olsen/react-native-debug-console.git
synced 2026-02-08 00:36:26 +01:00
Initial test setup
This commit is contained in:
@@ -32,12 +32,12 @@ const theme = {
|
||||
};
|
||||
|
||||
const Wrapper = styled.View``;
|
||||
const List = styled.View`
|
||||
export const List = styled.View`
|
||||
padding-left: 10px;
|
||||
border-left-width: 10px;
|
||||
border-color: ${props => props.color || 'black' }
|
||||
`;
|
||||
const Row = styled.View`
|
||||
export const Row = styled.View`
|
||||
margin: 10px;
|
||||
`;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const proxyConsole = window.console;
|
||||
export const proxyConsole = global.console;
|
||||
|
||||
class Log {
|
||||
constructor() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const proxied = window.XMLHttpRequest.prototype.open;
|
||||
const proxied = global.XMLHttpRequest ? global.XMLHttpRequest.prototype.open : () => {};
|
||||
let currentId = 0;
|
||||
|
||||
class Network {
|
||||
@@ -46,7 +46,7 @@ class Network {
|
||||
attach() {
|
||||
const me = this;
|
||||
const headers = {};
|
||||
window.XMLHttpRequest.prototype.open = function proxyOpen (...args) {
|
||||
global.XMLHttpRequest.prototype.open = function proxyOpen (...args) {
|
||||
let sendArgs;
|
||||
const [
|
||||
method,
|
||||
@@ -100,7 +100,7 @@ class Network {
|
||||
}
|
||||
|
||||
detach() {
|
||||
window.XMLHttpRequest.prototype.open = proxied;
|
||||
global.XMLHttpRequest.prototype.open = proxied;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user