From 233f80d6c26351fbac3e1b5faaf3fac761c68a15 Mon Sep 17 00:00:00 2001 From: Spencer Ahrens Date: Thu, 9 Jul 2015 14:12:56 +0200 Subject: [PATCH] Fix tests e2e flowconfig needed update, plus tweaks --- .gitignore | 1 + Examples/SampleApp/_flowconfig | 8 ++++++++ local-cli/__tests__/install-test.js | 9 ++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f82c4f157f409b..5326cd9cab3bee 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ project.xcworkspace # Node node_modules *.log +.nvm diff --git a/Examples/SampleApp/_flowconfig b/Examples/SampleApp/_flowconfig index c2feaa128bb1b4..b2a76e02978922 100644 --- a/Examples/SampleApp/_flowconfig +++ b/Examples/SampleApp/_flowconfig @@ -32,5 +32,13 @@ node_modules/react-native/Libraries/react-native/react-native-interface.js [options] module.system=haste +suppress_type=$FlowIssue +suppress_type=$FlowFixMe +suppress_type=$FixMe + +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-3]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-3]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy + [version] 0.13.1 diff --git a/local-cli/__tests__/install-test.js b/local-cli/__tests__/install-test.js index b3d374522f5ede..bfecc2e25fc8b6 100644 --- a/local-cli/__tests__/install-test.js +++ b/local-cli/__tests__/install-test.js @@ -18,7 +18,7 @@ describe('setup Podfile', function() { it('creates a Podfile if none exists', function() { try { - fs.unlinkSync(path.resolve(__dirname, 'Podfile')); + fs.unlinkSync(path.resolve(__dirname, '../Podfile')); } catch(e) {} var setupPodfile = install.setupPodfile(); @@ -37,8 +37,11 @@ describe('setup Podfile', function() { expect(setupPodfile.podfileText).toContain(openingReactTag); expect(setupPodfile.podfileText).toContain(closingReactTag); + // cleanup try { - fs.unlinkSync(path.resolve(__dirname, 'Podfile')); - } catch(e) {} + fs.unlinkSync(path.resolve(__dirname, '../Podfile')); + } catch(e) { + throw new Error('failed to cleanup Podfile', e); + } }); });