diff --git a/packages/platform-ios/src/config/__tests__/getProjectConfig.test.ts b/packages/platform-ios/src/config/__tests__/getProjectConfig.test.ts index ca1e99add..99b3b6b38 100644 --- a/packages/platform-ios/src/config/__tests__/getProjectConfig.test.ts +++ b/packages/platform-ios/src/config/__tests__/getProjectConfig.test.ts @@ -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, + } + `); + }); });