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
import mockery from ‘mockery’ | |
// inject __DEV__ | |
global.__DEV__ = true | |
// We enable mockery and leave it on. | |
mockery.enable() | |
// Silence mockery's warnings as we'll opt-in to mocks instead | |
mockery.warnOnUnregistered(false) |
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
import mockery from ‘mockery’ | |
// inject __DEV__ | |
global.__DEV__ = true | |
// We enable mockery and leave it on. | |
mockery.enable() | |
// Silence mockery's warnings as we'll opt-in to mocks instead | |
mockery.warnOnUnregistered(false) |
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
mockery.registerMock('react-native-router-flux', { | |
Actions: { | |
login: () => {}, | |
video: () => {} | |
} | |
}) |
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
/** | |
* -------------------- | |
* ReactotronSlowlog.js | |
* -------------------- | |
* | |
* A Reactotron plugin for react-native-slowlog by Dotan J. Nahum. | |
* | |
* https://github.com/jondot/react-native-slowlog | |
* | |
* --- PRE-REQUESTS --- |
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
api.post('/upload', data, { | |
onUploadProgress: progressEvent => { | |
const percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total) | |
// don't be spammy when we log | |
if (percentComplete % 10 === 0) { | |
console.tron.log(``) | |
} | |
} | |
}) |
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
// Source: https://github.com/szwacz/fs-jetpack/blob/master/lib/read.js#L22-L32 | |
const fromJsonDate = value => { | |
const reISO = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*))(?:Z|(\+|-)([\d|:]*))?$/ | |
if (typeof value === 'string') { | |
if (reISO.exec(value)) { | |
return new Date(value) | |
} | |
} | |
return value | |
} |
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
[ | |
{ | |
"name": "node-debug2", | |
"publisher": "ms-vscode", | |
"version": "1.18.4", | |
"id": "ms-vscode.node-debug2", | |
"__metadata": { | |
"id": "36d19e17-7569-4841-a001-947eb18602b2", | |
"publisherId": "5f5636e7-69ed-4afe-b5d6-8d231fb3d3ee", | |
"publisherDisplayName": "Microsoft" |