2017-11-02 13:14:11 +00:00
|
|
|
/**
|
2018-02-09 01:10:29 +00:00
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
2017-11-02 13:14:11 +00:00
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2017-11-02 13:14:11 +00:00
|
|
|
*
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* @emails oncall+javascript_foundation
|
|
|
|
*/
|
|
|
|
|
2016-07-30 15:59:16 +00:00
|
|
|
'use strict';
|
|
|
|
|
2016-08-22 15:56:14 +00:00
|
|
|
const makeImportPatch = require('../../android/patches/makeImportPatch');
|
2016-07-30 15:59:16 +00:00
|
|
|
|
|
|
|
const packageImportPath = 'import some.example.project';
|
|
|
|
|
|
|
|
describe('makeImportPatch', () => {
|
|
|
|
it('should build a patch', () => {
|
|
|
|
expect(Object.prototype.toString(makeImportPatch(packageImportPath)))
|
|
|
|
.toBe('[object Object]');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('MainActivity contains a correct import patch', () => {
|
|
|
|
const {patch} = makeImportPatch(packageImportPath);
|
|
|
|
|
|
|
|
expect(patch).toBe('\n' + packageImportPath);
|
|
|
|
});
|
|
|
|
});
|