Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,48 @@
* LICENSE file in the root directory of this source tree.
*
*/
import {projectConfig} from '../index';

jest.mock('path');
jest.mock('fs');

const fs = require('fs');

describe('ios::getProjectConfig', () => {
it.skip('returns `null` if Podfile was not found', () => {});
it.skip('returns an object with ios project configuration', () => {});
it.skip('returns correct configuration when multiple Podfile are present', () => {});
it('returns `null` if Podfile was not found', () => {
fs.__setMockFilesystem({});
expect(projectConfig('/', {})).toBe(null);
});
it('returns an object with ios project configuration', () => {
fs.__setMockFilesystem({
ios: {
Podfile: '',
},
});
expect(projectConfig('/', {})).toMatchInlineSnapshot(`
Object {
"sourceDir": "/ios",
"xcodeProject": null,
}
`);
});
it('returns correct configuration when multiple Podfile are present', () => {
fs.__setMockFilesystem({
sample: {
Podfile: '',
},
ios: {
Podfile: '',
},
example: {
Podfile: '',
},
});
expect(projectConfig('/', {})).toMatchInlineSnapshot(`
Object {
"sourceDir": "/ios",
"xcodeProject": null,
}
`);
});
});