Skip to content

Commit

Permalink
Add config test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 committed Oct 11, 2024
1 parent badacd2 commit d606ab9
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion test/config_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
import 'package:io/io.dart';
import 'package:test/test.dart';

import 'test_utils.dart';
import 'package:path/path.dart' as path;

void main() {}
void main() {
group('config', () {
test('exclude', () async {
final result = await testCommand(
['gen'],
projects: {
'puby_yaml_test': {
'pubspec.yaml': pubspec('puby_yaml_test'),
'puby.yaml': '''
exclude:
- pub run build_runner
''',
},
},
);

// Since the code generation doesn't actually run the command should succeed
expect(result.exitCode, ExitCode.success.code);

expectLine(result, [path.join('puby_yaml_test'), 'Skip']);
});
});
}

0 comments on commit d606ab9

Please sign in to comment.