react-native/local-cli/link/__tests__/ios/getBuildProperty.spec.js
Mike Grabowski 545072b02d Fully support new import system on iOS
Summary:
A bit late to the party, but upgraded, tests replaced, all green.

Also updated `pbxproj` so that we are testing against React 0.40 init result, not against something old.

To cherry-pick and land once ships.
Closes https://github.com/facebook/react-native/pull/11868

Differential Revision: D4411362

fbshipit-source-id: c485fd76114979d34a7e288bb70e1ecb9b3baf76
2017-01-12 14:58:28 -08:00

23 lines
544 B
JavaScript

'use strict';
jest.autoMockOff();
const xcode = require('xcode');
const path = require('path');
const getBuildProperty = require('../../ios/getBuildProperty');
const project = xcode.project(
path.join(__dirname, '../../__fixtures__/project.pbxproj')
);
describe('ios::getBuildProperty', () => {
beforeEach(() => {
project.parseSync();
});
it('should return build property from main target', () => {
const plistPath = getBuildProperty(project, 'INFOPLIST_FILE');
expect(plistPath).toEqual('Basic/Info.plist');
});
});