FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Keyframes/test/css.js at master · propxt/Keyframes · GitHub
propxt
/
Keyframes
Public
forked from
Keyframes/Keyframes
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Keyframes
/
test
/
css.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
49 lines (40 loc) · 1.42 KB
Breadcrumbs
Keyframes
/
test
/
css.js
Copy path
File metadata and controls
49 lines (40 loc) · 1.42 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
39
40
41
42
43
44
45
46
47
48
49
const
assert
=
require
(
'assert'
)
;
const
Keyframes
=
require
(
'../dist/keyframes'
)
.
default
;
describe
(
'CSS'
,
(
)
=>
{
describe
(
'#playCSS()'
,
(
)
=>
{
it
(
'should return css for the animation rule'
,
(
)
=>
{
const
css
=
Keyframes
.
playCSS
(
{
name
:
'ball-spin'
,
duration
:
'1s'
,
iterationCount
:
1
}
)
;
assert
.
equal
(
css
,
"ball-spin 1s ease 0s 1 normal forwards"
)
;
}
)
;
}
)
;
describe
(
'#defineCSS()'
,
(
)
=>
{
it
(
'should return css defined keyframes'
,
(
)
=>
{
let
css
=
Keyframes
.
defineCSS
(
{
name
:
'ball-spin'
,
from
:
{
transform
:
'rotate(90deg)'
,
}
,
to
:
{
transform
:
'rotate(450deg)'
,
}
,
}
)
;
assert
.
equal
(
css
,
"@keyframes ball-spin {from {transform:rotate(90deg);}to {transform:rotate(450deg);}}"
)
;
css
=
Keyframes
.
defineCSS
(
[
{
name
:
'ball-spin'
,
from
:
{
transform
:
'rotate(90deg)'
,
}
,
}
,
{
name
:
'ball-spin2'
,
from
:
{
transform
:
'rotate(70deg)'
,
}
,
}
]
)
;
assert
.
equal
(
css
,
"@keyframes ball-spin {from {transform:rotate(90deg);}}@keyframes ball-spin2 {from {transform:rotate(70deg);}}"
)
;
}
)
;
}
)
;
}
)
Back
|
FazBrowse Home
|
New Git URL