From 0f3077a807d0440631ecb18b3b881b0e14b064ee Mon Sep 17 00:00:00 2001 From: Mike Grabowski Date: Tue, 5 Apr 2016 08:17:20 +0200 Subject: [PATCH 1/2] Show failing suite --- test/ios/findProject.spec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/ios/findProject.spec.js b/test/ios/findProject.spec.js index f7a3593..0b0074d 100644 --- a/test/ios/findProject.spec.js +++ b/test/ios/findProject.spec.js @@ -32,6 +32,11 @@ describe('ios::findProject', () => { expect(findProject('')).toBe(null); }); + it('should ignore Pods inside `ios` folder', () => { + mockFs({ ios: { Pods: projects.flat } }); + expect(findProject('')).toBe(null); + }); + it('should ignore xcodeproj from example folders', () => { mockFs({ examples: projects.flat, From 396ee90fa4d332de8a59c2a99dca0c9d3031f7f5 Mon Sep 17 00:00:00 2001 From: Mike Grabowski Date: Tue, 5 Apr 2016 08:19:40 +0200 Subject: [PATCH 2/2] Fix --- src/config/ios/findProject.js | 2 +- test/ios/findProject.spec.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/config/ios/findProject.js b/src/config/ios/findProject.js index 8503aa3..2b8d58a 100644 --- a/src/config/ios/findProject.js +++ b/src/config/ios/findProject.js @@ -19,7 +19,7 @@ const IOS_BASE = 'ios'; /** * These folders will be excluded from search to speed it up */ -const GLOB_EXCLUDE_PATTERN = ['@(Pods|node_modules)/**']; +const GLOB_EXCLUDE_PATTERN = ['**/@(Pods|node_modules)/**']; /** * Finds iOS project by looking for all .xcodeproj files diff --git a/test/ios/findProject.spec.js b/test/ios/findProject.spec.js index 0b0074d..2a8326f 100644 --- a/test/ios/findProject.spec.js +++ b/test/ios/findProject.spec.js @@ -33,8 +33,13 @@ describe('ios::findProject', () => { }); it('should ignore Pods inside `ios` folder', () => { - mockFs({ ios: { Pods: projects.flat } }); - expect(findProject('')).toBe(null); + mockFs({ + ios: { + Pods: projects.flat, + SampleApp: projects.flat.ios, + }, + }); + expect(findProject('')).toBe('ios/SampleApp/sampleProject.xcodeproj'); }); it('should ignore xcodeproj from example folders', () => {