mirror of https://github.com/status-im/metro.git
Improved OSS flow and lint reporting
Summary:- lint bot is now managed by Circle CI - checked that flow and lint errors are caught both by bot and CI - flow fix for npm 3 - Travis is now using npm 2 and Circle CI npm 3 - Refactored Travis script to be able to be able to fail on multiple lines Closes https://github.com/facebook/react-native/pull/6508 Differential Revision: D3069500 Pulled By: davidaurelio fb-gh-sync-id: 02772bf1eae5f2c44489c2e3a01899428a9640cb shipit-source-id: 02772bf1eae5f2c44489c2e3a01899428a9640cb
This commit is contained in:
parent
d533323781
commit
8a860a01c5
|
@ -1,9 +1,15 @@
|
|||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
.dontMock('node-haste/lib/lib/getPlatformExtension')
|
||||
.dontMock('node-haste/node_modules/throat')
|
||||
.dontMock('../');
|
||||
jest.autoMockOff();
|
||||
|
||||
jest
|
||||
.mock('crypto')
|
||||
|
|
|
@ -8,15 +8,24 @@
|
|||
*/
|
||||
'use strict';
|
||||
|
||||
jest.autoMockOff();
|
||||
|
||||
jest
|
||||
.setMock('worker-farm', () => () => undefined)
|
||||
.dontMock('node-haste/node_modules/throat')
|
||||
.dontMock('lodash')
|
||||
.dontMock('../../lib/ModuleTransport')
|
||||
.setMock('uglify-js')
|
||||
.dontMock('../');
|
||||
|
||||
jest.mock('fs');
|
||||
.mock('image-size')
|
||||
.mock('fs')
|
||||
.mock('assert')
|
||||
.mock('progress')
|
||||
.mock('node-haste')
|
||||
.mock('../../JSTransformer')
|
||||
.mock('../../lib/declareOpts')
|
||||
.mock('../../Resolver')
|
||||
.mock('../Bundle')
|
||||
.mock('../PrepackBundle')
|
||||
.mock('../HMRBundle')
|
||||
.mock('../../Activity')
|
||||
.mock('../../lib/declareOpts');
|
||||
|
||||
var Bundler = require('../');
|
||||
var Resolver = require('../../Resolver');
|
||||
|
|
|
@ -8,22 +8,22 @@
|
|||
*/
|
||||
'use strict';
|
||||
|
||||
jest.autoMockOff();
|
||||
|
||||
jest.setMock('worker-farm', function() { return () => {}; })
|
||||
.dontMock('node-haste/node_modules/throat')
|
||||
.dontMock('os')
|
||||
.dontMock('lodash')
|
||||
.dontMock('path')
|
||||
.dontMock('url')
|
||||
.setMock('timers', { setImmediate: (fn) => setTimeout(fn, 0) })
|
||||
.setMock('uglify-js')
|
||||
.dontMock('../')
|
||||
.setMock('crypto');
|
||||
.setMock('crypto')
|
||||
.mock('../../Bundler')
|
||||
.mock('../../AssetServer')
|
||||
.mock('../../lib/declareOpts')
|
||||
.mock('node-haste')
|
||||
.mock('../../Activity');
|
||||
|
||||
const Promise = require('promise');
|
||||
|
||||
var Bundler = require('../../Bundler');
|
||||
var Server = require('../');
|
||||
var Server = require('../../Server');
|
||||
var AssetServer = require('../../AssetServer');
|
||||
|
||||
var FileWatcher;
|
||||
|
@ -108,7 +108,7 @@ describe('processRequest', () => {
|
|||
requestHandler,
|
||||
'mybundle.bundle?runModule=true'
|
||||
).then(response => {
|
||||
expect(response.getHeader('ETag')).toBeDefined()
|
||||
expect(response.getHeader('ETag')).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -118,7 +118,7 @@ describe('processRequest', () => {
|
|||
'mybundle.bundle?runModule=true',
|
||||
{ headers : { 'if-none-match' : 'this is an etag' } }
|
||||
).then(response => {
|
||||
expect(response.statusCode).toEqual(304)
|
||||
expect(response.statusCode).toEqual(304);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -262,7 +262,7 @@ describe('processRequest', () => {
|
|||
|
||||
Bundler.prototype.bundle = bundleFunc;
|
||||
|
||||
const server = new Server(options);
|
||||
server = new Server(options);
|
||||
server.setHMRFileChangeListener(() => {});
|
||||
|
||||
requestHandler = server.processRequest.bind(server);
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
*/
|
||||
'use strict';
|
||||
|
||||
jest.autoMockOff();
|
||||
jest.setMock('uglify-js')
|
||||
.mock('net')
|
||||
.mock('fs')
|
||||
.dontMock('node-haste/node_modules/throat')
|
||||
.dontMock('../SocketServer');
|
||||
.mock('bser')
|
||||
.mock('../../Server');
|
||||
|
||||
var PackagerServer = require('../../Server');
|
||||
var SocketServer = require('../SocketServer');
|
||||
|
|
Loading…
Reference in New Issue