-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcss_justify_items_test.dart
More file actions
38 lines (37 loc) · 1.44 KB
/
css_justify_items_test.dart
File metadata and controls
38 lines (37 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import 'package:spark_css/spark_css.dart';
import 'package:test/test.dart';
void main() {
group('CssJustifyItems', () {
test('keywords output correct CSS', () {
expect(CssJustifyItems.normal.toCss(), equals('normal'));
expect(CssJustifyItems.stretch.toCss(), equals('stretch'));
expect(CssJustifyItems.start.toCss(), equals('start'));
expect(CssJustifyItems.end.toCss(), equals('end'));
expect(CssJustifyItems.center.toCss(), equals('center'));
expect(CssJustifyItems.left.toCss(), equals('left'));
expect(CssJustifyItems.right.toCss(), equals('right'));
expect(CssJustifyItems.baseline.toCss(), equals('baseline'));
expect(CssJustifyItems.firstBaseline.toCss(), equals('first baseline'));
expect(CssJustifyItems.lastBaseline.toCss(), equals('last baseline'));
});
test('variable outputs correct CSS', () {
expect(CssJustifyItems.variable('ji').toCss(), equals('var(--ji)'));
});
test('raw outputs value as-is', () {
expect(
CssJustifyItems.raw('legacy center').toCss(),
equals('legacy center'),
);
});
test('global outputs correct CSS', () {
expect(
CssJustifyItems.global(CssGlobal.inherit).toCss(),
equals('inherit'),
);
});
test('Style.typed integration', () {
final style = Style.typed(justifyItems: CssJustifyItems.center);
expect(style.toCss(), contains('justify-items: center;'));
});
});
}