Skip to content

Commit a42b3b0

Browse files
test: add Style.typed animation integration test
1 parent 182a5bb commit a42b3b0

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

packages/spark_css/test/css_animation_test.dart

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import 'package:spark_css/src/css_types/css_animation.dart';
2-
import 'package:spark_css/src/css_types/css_transition.dart';
3-
import 'package:spark_css/src/css_types/css_value.dart';
1+
import 'package:spark_css/spark_css.dart';
42
import 'package:test/test.dart';
53

64
void main() {
@@ -164,5 +162,15 @@ void main() {
164162
test('global outputs correct CSS', () {
165163
expect(CssAnimation.global(CssGlobal.inherit).toCss(), equals('inherit'));
166164
});
165+
test('Style.typed renders animation property', () {
166+
final style = Style.typed(
167+
animation: CssAnimation(
168+
name: 'fadeIn',
169+
duration: CssDuration.s(1),
170+
fillMode: CssAnimationFillMode.forwards,
171+
),
172+
);
173+
expect(style.toCss(), contains('animation: fadeIn 1s forwards;'));
174+
});
167175
});
168176
}

0 commit comments

Comments
 (0)