Héctor Ramos f2ad77f90a Update additional license headers
Reviewed By: sophiebits

Differential Revision: D7196607

fbshipit-source-id: 9e6452f583b2b5616f5bb38f26f2ae33c14bb820
2018-03-08 12:10:14 -08:00

29 lines
835 B
JavaScript

/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+javascript_foundation
*/
'use strict';
const path = require('path');
const isInstalled = require('../../android/isInstalled');
const projectConfig = {
buildGradlePath: path.join(__dirname, '../../__fixtures__/android/patchedBuild.gradle'),
};
describe('android::isInstalled', () => {
it('should return true when project is already in build.gradle', () => {
expect(isInstalled(projectConfig, 'test')).toBeTruthy();
expect(isInstalled(projectConfig, 'test2')).toBeTruthy();
});
it('should return false when project is not in build.gradle', () =>
expect(isInstalled(projectConfig, 'test3')).toBeFalsy()
);
});