[tests] new test infra - wip

This commit is contained in:
Salakar 2018-03-24 06:40:55 +00:00
parent b2ae5f857d
commit 20fcdef51a
3 changed files with 19 additions and 2 deletions

View File

@ -10,16 +10,26 @@ let scriptCached = null;
// this is a dummy file path - without a file name the source map is not used in the vm
const TEMP_BUNDLE_PATH = '/tmp/bridge/react-native.js';
// TODO -----------------------------------------------------------------------
// TODO -----------------------------------------------------------------------
// TODO -----------------------------------------------------------------------
// TODO
// TODO
// TODO
// TODO
// TODO
// TODO
// TODO This is just dirty code created just as a proof of concept
// TODO - need to cleanup
// TODO - need to clean it all up / refactor
// TODO
// TODO
// TODO
// TODO
// TODO
// TODO
// TODO -----------------------------------------------------------------------
// TODO -----------------------------------------------------------------------
// TODO -----------------------------------------------------------------------
/**
*
@ -174,12 +184,19 @@ process.on('ws-message', request => {
global.bridge.root = rootComponent;
},
},
get __coverage__() {
return global.__coverage__;
},
set __coverage__(val) {
return (global.__coverage__ = val);
},
});
sendResult(request.id);
return;
case 'executeApplicationScript':
// Modify the URL to make sure we get the inline source map.
// TODO we shouldn't be reparsing if scriptCached is set
const parsedUrl = url.parse(request.url, /* parseQueryString */ true);
invariant(parsedUrl.query);
parsedUrl.query.inlineSourceMap = true;

View File

@ -8,7 +8,6 @@ describe('.auth()', () => {
describe('.signInAnonymously()', () => {
it('it should sign in anonymously', () => {
const successCb = currentUser => {
debugger;
currentUser.should.be.an.Object();
currentUser.uid.should.be.a.String();
currentUser.toJSON().should.be.an.Object();

View File

@ -1,5 +1,6 @@
const detox = require('detox');
const config = require('../package.json').detox;
global.sinon = require('sinon');
require('should-sinon');
global.should = require('should');