2016-07-30 15:59:16 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
jest.autoMockOff();
|
|
|
|
|
2016-05-20 11:52:08 +00:00
|
|
|
const xcode = require('xcode');
|
2016-08-22 15:56:14 +00:00
|
|
|
const mapHeaderSearchPaths = require('../../ios/mapHeaderSearchPaths');
|
2016-07-30 15:59:16 +00:00
|
|
|
const path = require('path');
|
2016-05-20 11:52:08 +00:00
|
|
|
|
2016-07-30 15:59:16 +00:00
|
|
|
const project = xcode.project(
|
|
|
|
path.join(__dirname, '../../__fixtures__/project.pbxproj')
|
|
|
|
);
|
2016-05-20 11:52:08 +00:00
|
|
|
|
|
|
|
describe('ios::mapHeaderSearchPaths', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
project.parseSync();
|
|
|
|
});
|
|
|
|
|
2017-01-12 22:56:55 +00:00
|
|
|
/**
|
|
|
|
* Based on the fixtures, our assumption is that this function
|
|
|
|
* has to be executed two times.
|
|
|
|
*/
|
|
|
|
it('should be called twice', () => {
|
|
|
|
const callback = jest.fn();
|
|
|
|
mapHeaderSearchPaths(project, callback);
|
|
|
|
|
|
|
|
expect(callback.mock.calls.length).toBe(2);
|
2016-05-20 11:52:08 +00:00
|
|
|
});
|
|
|
|
});
|