Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed Sep 19, 2023
1 parent 993ca7c commit b541521
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:

steps:
- name: Prepare environment
uses: ./.github/actions/prepare/action.yml
uses: ./.github/actions/prepare
with:
sdk-version: ${{ github.event.inputs.sdk-version }}

- name: Tests
uses: ./.github/actions/test/action.yml
uses: ./.github/actions/test
14 changes: 13 additions & 1 deletion test/commands/flutter_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,13 @@ void main() {
versionNumber,
);

final dartVersionOut = dartVersionResult.stdout.toString().isEmpty
? dartVersionResult.stderr
: dartVersionResult.stdout;

final flutterVersion =
extractFlutterVersionOutput(flutterVersionResult.stdout);
final dartVersion = extractDartVersionOutput(dartVersionResult.stderr);
final dartVersion = extractDartVersionOutput(dartVersionOut);

expect(dartVersion, cacheVersion.dartSdkVersion);

Expand All @@ -118,6 +122,14 @@ void main() {
final cacheVersion = CacheService.fromContext
.getVersion(FlutterVersion.parse(versionNumber));

final exitCode = await runner.run('fvm exec flutter --version');

expect(exitCode, ExitCode.success.code);

final usageExitCode = await runner.run('fvm exec');

expect(usageExitCode, ExitCode.usage.code);

final flutterVersionResult =
await execCmd('flutter', ['--version'], cacheVersion);
final dartVersionResult =
Expand Down

0 comments on commit b541521

Please sign in to comment.