@@ -22,84 +22,86 @@ async function run(file, options = {}) {
22
22
return result . css
23
23
}
24
24
25
- it ( 'generates `delay` utilities' , async ( ) => {
26
- expect ( await run ( 'content/delay.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
27
- '.animate-delay-75 { animation-delay: 75ms; }' ,
28
- '.animate-delay-333 { animation-delay: 333ms; }' ,
29
- '.animate-delay-\\[666ms\\] { animation-delay: 666ms; }' ,
30
- ] )
31
- } )
25
+ describe ( 'modern tailwind' , ( ) => {
26
+ it ( 'generates `composition` utilities' , async ( ) => {
27
+ expect ( await run ( 'content/composition.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
28
+ '.animate-add { animation-composition: add; }' ,
29
+ '.animate-replace { animation-composition: replace; }' ,
30
+ '.animate-accumulate { animation-composition: accumulate; }' ,
31
+ ] )
32
+ } )
32
33
33
- it ( 'generates `duration ` utilities' , async ( ) => {
34
- expect ( await run ( 'content/duration .html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
35
- '.animate-duration -75 { animation-duration : 75ms; }' ,
36
- '.animate-duration -333 { animation-duration : 333ms; }' ,
37
- '.animate-duration -\\[666ms\\] { animation-duration : 666ms; }' ,
38
- ] )
39
- } )
34
+ it ( 'generates `delay ` utilities' , async ( ) => {
35
+ expect ( await run ( 'content/delay .html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
36
+ '.animate-delay -75 { animation-delay : 75ms; }' ,
37
+ '.animate-delay -333 { animation-delay : 333ms; }' ,
38
+ '.animate-delay -\\[666ms\\] { animation-delay : 666ms; }' ,
39
+ ] )
40
+ } )
40
41
41
- it ( 'generates `direction` utilities' , async ( ) => {
42
- expect ( await run ( 'content/direction.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
43
- '.animate-normal { animation-direction: normal; }' ,
44
- '.animate-reverse { animation-direction: reverse; }' ,
45
- ] )
46
- } )
42
+ it ( 'generates `direction` utilities' , async ( ) => {
43
+ expect ( await run ( 'content/direction.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
44
+ '.animate-normal { animation-direction: normal; }' ,
45
+ '.animate-reverse { animation-direction: reverse; }' ,
46
+ ] )
47
+ } )
47
48
48
- it ( 'generates `fill-mode` utilities' , async ( ) => {
49
- expect ( await run ( 'content/fill-mode.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
50
- '.animate-fill-both { animation-fill-mode: both; }' ,
51
- '.animate-fill-none { animation-fill-mode: normal; }' ,
52
- ] )
53
- } )
49
+ it ( 'generates `duration` utilities' , async ( ) => {
50
+ expect ( await run ( 'content/duration.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
51
+ '.animate-duration-75 { animation-duration: 75ms; }' ,
52
+ '.animate-duration-333 { animation-duration: 333ms; }' ,
53
+ '.animate-duration-\\[666ms\\] { animation-duration: 666ms; }' ,
54
+ ] )
55
+ } )
54
56
55
- it ( 'generates `iteration-count` utilities' , async ( ) => {
56
- expect ( await run ( 'content/iteration-count.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
57
- '.animate-infinite { animation-iteration-count: infinite; }' ,
58
- '.animate-once { animation-iteration-count: 1; }' ,
59
- '.animate-iteration-7 { animation-iteration-count: 7; }' ,
60
- '.animate-iteration-\\[14\\] { animation-iteration-count: 14; }' ,
61
- ] )
62
- } )
57
+ it ( 'generates `fill-mode` utilities' , async ( ) => {
58
+ expect ( await run ( 'content/fill-mode.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
59
+ '.animate-fill-both { animation-fill-mode: both; }' ,
60
+ '.animate-fill-none { animation-fill-mode: normal; }' ,
61
+ ] )
62
+ } )
63
63
64
- it ( 'generates `play-state` utilities' , async ( ) => {
65
- expect ( await run ( 'content/play-state.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
66
- '.animate-play { animation-play-state: running; }' ,
67
- '.animate-stop { animation-play-state: paused; }' ,
68
- ] )
69
- } )
64
+ it ( 'generates `iteration-count` utilities' , async ( ) => {
65
+ expect ( await run ( 'content/iteration-count.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
66
+ '.animate-infinite { animation-iteration-count: infinite; }' ,
67
+ '.animate-once { animation-iteration-count: 1; }' ,
68
+ '.animate-iteration-7 { animation-iteration-count: 7; }' ,
69
+ '.animate-iteration-\\[14\\] { animation-iteration-count: 14; }' ,
70
+ ] )
71
+ } )
70
72
71
- it ( 'generates `timing-function` utilities' , async ( ) => {
72
- expect ( await run ( 'content/timing-function.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
73
- '.animate-ease { animation-timing-function: ease; }' ,
74
- '.animate-ease-linear { animation-timing-function: linear; }' ,
75
- '.animate-ease-\\[cubic-bezier\\(1\\,0\\.66\\,0\\.33\\,0\\)\\] { animation-timing-function: cubic-bezier(1,0.66,0.33,0); }' ,
76
- ] )
77
- } )
73
+ it ( 'generates `play-state` utilities' , async ( ) => {
74
+ expect ( await run ( 'content/play-state.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
75
+ '.animate-play { animation-play-state: running; }' ,
76
+ '.animate-stop { animation-play-state: paused; }' ,
77
+ ] )
78
+ } )
78
79
79
- it ( 'generates `composition` utilities' , async ( ) => {
80
- expect ( await run ( 'content/composition.html' , { scope : 'utilities' } ) ) . toIncludeAll ( [
81
- '.animate-add { animation-composition: add; }' ,
82
- '.animate-replace { animation-composition: replace; }' ,
83
- '.animate-accumulate { animation-composition: accumulate; }' ,
84
- ] )
85
- } )
80
+ it ( 'generates predefined animations for modern import' , async ( ) => {
81
+ expect ( await run ( 'content/predefined-animations.html' , { importType : 'modern' } ) ) . toIncludeAll ( [
82
+ '.animate-fade { animation: var(--animate-fade); }' ,
83
+ '--animate-fade: fade var(--default-animation-duration, 1s) var(--default-animation-timing-function, ease) var(--default-animation-delay, 0s) both;' ,
84
+ '@keyframes fade { 0% { opacity: 0; } 100% { opacity: 1; }}' ,
85
+ '.animate-spin { animation: var(--animate-spin); }' ,
86
+ '--animate-spin: spin var(--default-animation-duration, 1s) var(--default-animation-timing-function, linear) var(--default-animation-delay, 0s) infinite;' ,
87
+ '@keyframes spin { to { transform: rotate(360deg); }}' ,
88
+ ] )
89
+ } )
86
90
87
- it ( 'generates predefined animations for modern import' , async ( ) => {
88
- expect ( await run ( 'content/predefined-animations.html' , { importType : 'modern' } ) ) . toIncludeAll ( [
89
- '.animate-fade { animation: var(--animate-fade); }' ,
90
- '--animate-fade: fade var(--default-animation-duration, 1s) var(--default-animation-timing-function, ease) var(--default-animation-delay, 0s) both;' ,
91
- '@keyframes fade { 0% { opacity: 0; } 100% { opacity: 1; }}' ,
92
- '.animate-spin { animation: var(--animate-spin); }' ,
93
- '--animate-spin: spin var(--default-animation-duration, 1s) var(--default-animation-timing-function, linear) var(--default-animation-delay, 0s) infinite;' ,
94
- '@keyframes spin { to { transform: rotate(360deg); }}' ,
95
- ] )
96
- } )
91
+ it ( 'generates predefined animations for legacy import' , async ( ) => {
92
+ expect ( await run ( 'content/predefined-animations.html' , { importType : 'legacy' } ) ) . toIncludeAll ( [
93
+ '.animate-fade { animation: fade var(--default-animation-duration, 1s) var(--default-animation-timing-function, ease) var(--default-animation-delay, 0s) both; }' ,
94
+ '@keyframes fade { 0% { opacity: 0; } 100% { opacity: 1; }}' ,
95
+ '.animate-spin { animation: spin var(--default-animation-duration, 1s) var(--default-animation-timing-function, linear) var(--default-animation-delay, 0s) infinite; }' ,
96
+ '@keyframes spin { to { transform: rotate(360deg); }}' ,
97
+ ] )
98
+ } )
97
99
98
- it ( 'generates predefined animations for legacy import ' , async ( ) => {
99
- expect ( await run ( 'content/predefined-animations .html' , { importType : 'legacy ' } ) ) . toIncludeAll ( [
100
- '.animate-fade { animation: fade var(--default-animation-duration, 1s) var(--default-animation- timing-function, ease) var(--default-animation-delay, 0s) both ; }' ,
101
- '@keyframes fade { 0% { opacity: 0; } 100% { opacity: 1; } }',
102
- '.animate-spin { animation: spin var(--default-animation-duration, 1s) var(--default- animation-timing-function, linear) var(--default-animation-delay, 0s) infinite ; }',
103
- '@keyframes spin { to { transform: rotate(360deg); }}' ,
104
- ] )
100
+ it ( 'generates `timing-function` utilities ' , async ( ) => {
101
+ expect ( await run ( 'content/timing-function .html' , { scope : 'utilities ' } ) ) . toIncludeAll ( [
102
+ '.animate-ease { animation- timing-function: ease; }' ,
103
+ '.animate-ease-linear { animation-timing-function: linear; }',
104
+ '.animate-ease-\\[cubic-bezier\\(1\\,0\\.66\\,0\\.33\\,0\\)\\] { animation-timing-function: cubic-bezier(1,0.66,0.33,0) ; }',
105
+ ] )
106
+ } )
105
107
} )
0 commit comments