|
25 | 25 | yarn(command: 'test', options: '--fail-fast', package_path: 'spec/fixtures/package.json') |
26 | 26 | end").runner.execute(:test) |
27 | 27 |
|
28 | | - expect(result).to eq("cd spec/fixtures && yarn test -- --fail-fast") |
| 28 | + expect(result).to eq("cd spec/fixtures && yarn test --fail-fast") |
| 29 | + end |
| 30 | + it 'run some script with some option with missing --' do |
| 31 | + allow(FastlaneCore::FastlaneFolder).to receive(:path).and_return(nil) |
| 32 | + |
| 33 | + result = Fastlane::FastFile.new.parse("lane :test do |
| 34 | + yarn(command: 'test', options: 'fail-fast', package_path: 'spec/fixtures/package.json') |
| 35 | + end").runner.execute(:test) |
| 36 | + |
| 37 | + expect(result).to eq("cd spec/fixtures && yarn test --fail-fast") |
29 | 38 | end |
30 | 39 | it 'run some script with some option provided as list' do |
31 | 40 | allow(FastlaneCore::FastlaneFolder).to receive(:path).and_return(nil) |
|
34 | 43 | yarn(command: 'test', options: ['--fail-fast', 'please'], package_path: 'spec/fixtures/package.json') |
35 | 44 | end").runner.execute(:test) |
36 | 45 |
|
37 | | - expect(result).to eq("cd spec/fixtures && yarn test -- --fail-fast please") |
| 46 | + expect(result).to eq("cd spec/fixtures && yarn test --fail-fast --please") |
38 | 47 | end |
39 | | - it 'fail if package_path and project root are both provided' do |
| 48 | + it 'run some script with some option provided as list, one with param value' do |
| 49 | + allow(FastlaneCore::FastlaneFolder).to receive(:path).and_return(nil) |
| 50 | + |
| 51 | + result = Fastlane::FastFile.new.parse("lane :test do |
| 52 | + yarn(command: 'test', options: ['--fail-fast please', '--verbose'], package_path: 'spec/fixtures/package.json') |
| 53 | + end").runner.execute(:test) |
40 | 54 |
|
| 55 | + expect(result).to eq("cd spec/fixtures && yarn test --fail-fast please --verbose") |
| 56 | + end |
| 57 | + it 'fail if package_path and project root are both provided' do |
41 | 58 | expect { |
42 | 59 | Fastlane::FastFile.new.parse("lane :boom do |
43 | 60 | yarn(command: 'test', package_path: 'spec/fixtures/package.json', project_root:'racine') |
|
0 commit comments