Skip to content

Commit b968ae9

Browse files
feat: Gradient tests ( Fixes #8 )
1 parent 71acee5 commit b968ae9

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Gradient.tests.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
describe Gradient {
2+
it 'Generates gradients' {
3+
$gradient = '#4488ff', '#224488' | Gradient
4+
"$gradient" | Should -Match '^radial-gradient\(.+?\)'
5+
}
6+
it 'Can stack gradients by joining them with commas' {
7+
$gradients = @(
8+
'linear', '217deg', 'rgb(255 0 0 / 80%)', 'transparent 70.71%' | Gradient
9+
'linear', '127deg', 'rgb(0 255 0 / 80%)', 'transparent 70.71%' | Gradient
10+
'linear', '336deg', 'rgb(0 0 255 / 80%)', 'transparent 70.71%' | Gradient
11+
)
12+
13+
$($gradients -join ',') | Should -Match 'linear-gradient.+?,'
14+
15+
}
16+
17+
}

0 commit comments

Comments
 (0)