Skip to content

Commit ebe40d6

Browse files
authored
Add a test for no outputs. (#207)
1 parent 6a84448 commit ebe40d6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/builder_test.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ void main() {
7575
throwsA(const isInstanceOf<InvalidGenerationSourceError>()));
7676
});
7777

78+
test('Does not fail when there is no output', () async {
79+
var sources = _createPackageStub(pkgName, testLibContent: 'class A {}');
80+
var builder =
81+
new GeneratorBuilder([new CommentGenerator(forClasses: false)]);
82+
await testBuilder(builder, sources, outputs: {});
83+
});
84+
7885
test('Allow no "library" when requireLibraryDirective=false', () async {
7986
var sources = _createPackageStub(pkgName, testLibContent: 'class A {}');
8087
var builder = new GeneratorBuilder([const CommentGenerator()],

0 commit comments

Comments
 (0)