Passed
Push — master ( b113b5...f2f27e )
by Rafael
01:28
created

test/color/button_test.js   A

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 18
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A button_test.js ➔ describe(ꞌbutton stylesꞌ) 0 16 1
1
import { Button } from '../../src/controls/color/js/button.js';
2
3
describe( 'button styles', function() {
4
	it( 'creates sass', function() {
5
		let button = new Button(),
6
			expected = '$ubtn-colors: (\'primary\' yellow #1a1a1a)(\'secondary\' red #1a1a1a);',
7
			colors = [
8
				{ 'name': 'primary', val: 'yellow' },
9
				{ 'name': 'secondary', val: 'red' }
10
			];
11
12
		expect( expected ).toEqual( button.formatColorSass( colors ) );
13
	} );
14
	it( 'creates sass without args', function() {
15
		let button = new Button();
16
		expect( '' ).toEqual( button.formatColorSass() );
17
	} );
18
} );
19