Skip to content

Commit 5280615

Browse files
actually verify functionality in test
1 parent a30aabc commit 5280615

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/src/dependency_validator.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import 'dart:io';
1616

17-
import 'package:analyzer/dart/analysis/utilities.dart';
1817
import 'package:build_config/build_config.dart';
1918
import 'package:dependency_validator/src/import_export_ast_visitor.dart';
2019
import 'package:glob/glob.dart';

test/executable_test.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,15 @@ void main() {
414414
test('and import is commented out', () async {
415415
await d.dir('unused', [
416416
d.dir('lib', [
417-
d.file('invalid.dart', '// import \'package:fake_project/fake.dart\';'), // commented out import
417+
d.file('commented_out.dart', '// import \'package:other_project/other.dart\';'), // commented out import
418418
]),
419+
d.dir('test', [
420+
d.file('valid.dart', 'import \'package:fake_project/fake.dart\';'),
421+
])
419422
]).create();
423+
result = checkProject('${d.sandbox}/unused');
424+
expect(result.exitCode, 0);
425+
expect(result.stdout, contains('No dependency issues found!'));
420426
});
421427

422428
test('except when they are ignored', () async {

0 commit comments

Comments
 (0)