Passed
Push — master ( e92062...bf99ee )
by Rafael
01:11
created

test/animation/animation_test.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 22
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
nc 1
dl 0
loc 22
rs 10
noi 0
c 1
b 0
f 0
cc 0
wmc 4
mnd 0
bc 4
fnc 4
bpm 1
cpm 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A animation_test.js ➔ describe(ꞌAnimation Controlꞌ) 0 20 1
1
import { Animation } from '../../../controls';
2
3
describe( 'Animation Control', function() {
4
	let $target = $( '<div data-wow-duration="1.5s" data-wow-delay="0s">' ),
5
		animationControl = new Animation( { target: $target } ),
6
		$control = animationControl.render();
7
8
	it( 'creates html', function() {
9
		expect( !! $control.html().length ).toEqual( true );
10
	} );
11
12
	it( 'adds animation classes', function() {
13
		$control.find( 'select' ).val( 'fadeOut' ).change();
14
		expect( $target.hasClass( 'wow' ) ).toEqual( true );
15
	} );
16
17
	it( 'presets sliders', function() {
18
		expect( animationControl.delayControl.$input.val() ).toEqual( '0' );
19
		expect( animationControl.durationControl.$input.val() ).toEqual( '1.5' );
20
	} );
21
22
} );
23