2016-07-30 08:59:16 -07:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
jest.autoMockOff();
|
|
|
|
|
2016-05-20 04:52:08 -07:00
|
|
|
const xcode = require('xcode');
|
2016-08-22 08:56:14 -07:00
|
|
|
const mapHeaderSearchPaths = require('../../ios/mapHeaderSearchPaths');
|
2016-07-30 08:59:16 -07:00
|
|
|
const path = require('path');
|
2016-05-20 04:52:08 -07:00
|
|
|
|
2016-07-30 08:59:16 -07:00
|
|
|
const project = xcode.project(
|
|
|
|
path.join(__dirname, '../../__fixtures__/project.pbxproj')
|
|
|
|
);
|
2016-05-20 04:52:08 -07:00
|
|
|
|
|
|
|
describe('ios::mapHeaderSearchPaths', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
project.parseSync();
|
|
|
|
});
|
|
|
|
|
2017-01-12 14:56:55 -08: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 04:52:08 -07:00
|
|
|
});
|
|
|
|
});
|