File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,35 @@ describe('UNIT: Utils', function () {
11
11
12
12
} )
13
13
14
+ describe ( 'attr' , function ( ) {
15
+
16
+ var el = document . createElement ( 'div' )
17
+ el . setAttribute ( 'sd-transition-class' , 'test' )
18
+
19
+ it ( 'should append the prefix and return the attribute value' , function ( ) {
20
+ var val = utils . attr ( el , 'transition-class' )
21
+ assert . strictEqual ( val , 'test' )
22
+ } )
23
+
24
+ it ( 'should remove the attribute' , function ( ) {
25
+ assert . notOk ( el . hasAttribute ( 'sd-transition-class' ) )
26
+ } )
27
+
28
+ it ( 'should work with different prefix' , function ( ) {
29
+
30
+ Seed . config ( { prefix : 'test' } )
31
+
32
+ var el = document . createElement ( 'div' )
33
+ el . setAttribute ( 'test-transition-class' , 'test' )
34
+ var val = utils . attr ( el , 'transition-class' )
35
+ assert . strictEqual ( val , 'test' )
36
+ assert . notOk ( el . hasAttribute ( 'test-transition-class' ) )
37
+
38
+ Seed . config ( { prefix : 'sd' } )
39
+ } )
40
+
41
+ } )
42
+
14
43
describe ( 'defProtected' , function ( ) {
15
44
16
45
it ( 'should define a protected property' , function ( ) {
You can’t perform that action at this time.
0 commit comments