Skip to content

Commit 83e6761

Browse files
committed
chore: clean up
1 parent f0dce0d commit 83e6761

30 files changed

Lines changed: 962 additions & 1104 deletions

lib/node_modules/@stdlib/plot/vega/title/ctor/test/test.align.js

Lines changed: 8 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var tape = require( 'tape' );
2424
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
2525
var isUndefined = require( '@stdlib/assert/is-undefined' );
2626
var hasProp = require( '@stdlib/assert/has-property' );
27-
var isString = require( '@stdlib/assert/is-string' );
27+
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
2828
var Title = require( './../lib' );
2929

3030

@@ -36,10 +36,8 @@ tape( 'main export is a function', function test( t ) {
3636
t.end();
3737
});
3838

39-
tape( 'the constructor returns an instance which has a `align` property', function test( t ) {
40-
var v;
41-
42-
v = new Title();
39+
tape( 'the constructor returns an instance which has an `align` property', function test( t ) {
40+
var v = new Title();
4341
t.strictEqual( hasOwnProp( v, 'align' ), false, 'returns expected value' );
4442
t.strictEqual( hasProp( v, 'align' ), true, 'returns expected value' );
4543
t.strictEqual( isUndefined( v.align ), true, 'returns expected value' );
@@ -52,35 +50,7 @@ tape( 'the constructor returns an instance which has a `align` property', functi
5250
t.end();
5351
});
5452

55-
tape( 'the constructor throws an error if provided an invalid `align` option', function test( t ) {
56-
var values;
57-
var i;
58-
59-
values = [
60-
5,
61-
NaN,
62-
null,
63-
true,
64-
false,
65-
[],
66-
{},
67-
function noop() {}
68-
];
69-
for ( i = 0; i < values.length; i++ ) {
70-
t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
71-
}
72-
t.end();
73-
74-
function badValue( value ) {
75-
return function badValue() {
76-
var title = new Title({ // eslint-disable-line no-unused-vars
77-
'align': value
78-
});
79-
};
80-
}
81-
});
82-
83-
tape( 'the constructor returns an instance having a `align` property which throws an error if set to an invalid value', function test( t ) {
53+
tape( 'the constructor returns an instance having an `align` property which throws an error if set to an invalid value', function test( t ) {
8454
var values;
8555
var i;
8656

@@ -107,10 +77,8 @@ tape( 'the constructor returns an instance having a `align` property which throw
10777
}
10878
});
10979

110-
tape( 'the constructor returns an instance having a `align` property', function test( t ) {
111-
var title;
112-
113-
title = new Title();
80+
tape( 'the constructor returns an instance having an `align` property', function test( t ) {
81+
var title = new Title();
11482
t.strictEqual( isUndefined( title.align ), true, 'returns expected value' );
11583

11684
title = new Title({
@@ -126,10 +94,8 @@ tape( 'the constructor returns an instance having a `align` property', function
12694
t.end();
12795
});
12896

129-
tape( 'the constructor returns an instance having a `align` property which can be set to a valid method', function test( t ) {
130-
var title;
131-
132-
title = new Title();
97+
tape( 'the constructor returns an instance having an `align` property which can be set to a valid value', function test( t ) {
98+
var title = new Title();
13399

134100
title.align = 'left';
135101
t.strictEqual( title.align, 'left', 'returns expected value' );

lib/node_modules/@stdlib/plot/vega/title/ctor/test/test.anchor.js

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
var tape = require( 'tape' );
2424
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
2525
var hasProp = require( '@stdlib/assert/has-property' );
26-
var isString = require( '@stdlib/assert/is-string' );
26+
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
2727
var Title = require( './../lib' );
2828

2929

@@ -35,49 +35,16 @@ tape( 'main export is a function', function test( t ) {
3535
t.end();
3636
});
3737

38-
tape( 'the constructor returns an instance which has a `anchor` property', function test( t ) {
39-
var v;
40-
41-
v = new Title();
38+
tape( 'the constructor returns an instance which has an `anchor` property', function test( t ) {
39+
var v = new Title();
4240
t.strictEqual( hasOwnProp( v, 'anchor' ), false, 'returns expected value' );
4341
t.strictEqual( hasProp( v, 'anchor' ), true, 'returns expected value' );
4442
t.strictEqual( isString( v.anchor ), true, 'returns expected value' );
4543

4644
t.end();
4745
});
4846

49-
tape( 'the constructor throws an error if provided an invalid `anchor` option', function test( t ) {
50-
var values;
51-
var i;
52-
53-
values = [
54-
'beep',
55-
'boop',
56-
'START',
57-
5,
58-
NaN,
59-
null,
60-
true,
61-
false,
62-
[],
63-
{},
64-
function noop() {}
65-
];
66-
for ( i = 0; i < values.length; i++ ) {
67-
t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
68-
}
69-
t.end();
70-
71-
function badValue( value ) {
72-
return function badValue() {
73-
var title = new Title({ // eslint-disable-line no-unused-vars
74-
'anchor': value
75-
});
76-
};
77-
}
78-
});
79-
80-
tape( 'the constructor returns an instance having a `anchor` property which throws an error if set to an invalid value', function test( t ) {
47+
tape( 'the constructor returns an instance having an `anchor` property which throws an error if set to an invalid value', function test( t ) {
8148
var values;
8249
var i;
8350

@@ -107,10 +74,8 @@ tape( 'the constructor returns an instance having a `anchor` property which thro
10774
}
10875
});
10976

110-
tape( 'the constructor returns an instance having a `anchor` property', function test( t ) {
111-
var title;
112-
113-
title = new Title();
77+
tape( 'the constructor returns an instance having an `anchor` property', function test( t ) {
78+
var title = new Title();
11479
t.strictEqual( title.anchor, 'middle', 'returns expected value' );
11580

11681
title = new Title({
@@ -126,10 +91,8 @@ tape( 'the constructor returns an instance having a `anchor` property', function
12691
t.end();
12792
});
12893

129-
tape( 'the constructor returns an instance having a `anchor` property which can be set to a valid method', function test( t ) {
130-
var title;
131-
132-
title = new Title();
94+
tape( 'the constructor returns an instance having an `anchor` property which can be set to a valid value', function test( t ) {
95+
var title = new Title();
13396

13497
title.anchor = 'start';
13598
t.strictEqual( title.anchor, 'start', 'returns expected value' );

lib/node_modules/@stdlib/plot/vega/title/ctor/test/test.angle.js

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var tape = require( 'tape' );
2424
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
2525
var isUndefined = require( '@stdlib/assert/is-undefined' );
2626
var hasProp = require( '@stdlib/assert/has-property' );
27-
var isNumber = require( '@stdlib/assert/is-number' );
27+
var isNumber = require( '@stdlib/assert/is-number' ).isPrimitive;
2828
var Title = require( './../lib' );
2929

3030

@@ -36,10 +36,8 @@ tape( 'main export is a function', function test( t ) {
3636
t.end();
3737
});
3838

39-
tape( 'the constructor returns an instance which has a `angle` property', function test( t ) {
40-
var v;
41-
42-
v = new Title();
39+
tape( 'the constructor returns an instance which has an `angle` property', function test( t ) {
40+
var v = new Title();
4341
t.strictEqual( hasOwnProp( v, 'angle' ), false, 'returns expected value' );
4442
t.strictEqual( hasProp( v, 'angle' ), true, 'returns expected value' );
4543
t.strictEqual( isUndefined( v.angle ), true, 'returns expected value' );
@@ -80,7 +78,7 @@ tape( 'the constructor throws an error if provided an invalid `angle` option', f
8078
}
8179
});
8280

83-
tape( 'the constructor returns an instance having a `angle` property which throws an error if set to an invalid value', function test( t ) {
81+
tape( 'the constructor returns an instance having an `angle` property which throws an error if set to an invalid value', function test( t ) {
8482
var values;
8583
var i;
8684

@@ -107,10 +105,8 @@ tape( 'the constructor returns an instance having a `angle` property which throw
107105
}
108106
});
109107

110-
tape( 'the constructor returns an instance having a `angle` property', function test( t ) {
111-
var title;
112-
113-
title = new Title();
108+
tape( 'the constructor returns an instance having an `angle` property', function test( t ) {
109+
var title = new Title();
114110
t.strictEqual( isUndefined( title.angle ), true, 'returns expected value' );
115111

116112
title = new Title({
@@ -126,10 +122,8 @@ tape( 'the constructor returns an instance having a `angle` property', function
126122
t.end();
127123
});
128124

129-
tape( 'the constructor returns an instance having a `angle` property which can be set to a valid method', function test( t ) {
130-
var title;
131-
132-
title = new Title();
125+
tape( 'the constructor returns an instance having an `angle` property which can be set to a valid value', function test( t ) {
126+
var title = new Title();
133127

134128
title.angle = 90;
135129
t.strictEqual( title.angle, 90, 'returns expected value' );

lib/node_modules/@stdlib/plot/vega/title/ctor/test/test.aria.js

Lines changed: 8 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
var tape = require( 'tape' );
2424
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
2525
var hasProp = require( '@stdlib/assert/has-property' );
26-
var isBoolean = require( '@stdlib/assert/is-boolean' );
26+
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
2727
var Title = require( './../lib' );
2828

2929

@@ -35,45 +35,15 @@ tape( 'main export is a function', function test( t ) {
3535
t.end();
3636
});
3737

38-
tape( 'the constructor returns an instance which has a `aria` property', function test( t ) {
39-
var v;
40-
41-
v = new Title();
38+
tape( 'the constructor returns an instance which has an `aria` property', function test( t ) {
39+
var v = new Title();
4240
t.strictEqual( hasOwnProp( v, 'aria' ), false, 'returns expected value' );
4341
t.strictEqual( hasProp( v, 'aria' ), true, 'returns expected value' );
4442
t.strictEqual( isBoolean( v.aria ), true, 'returns expected value' );
4543
t.end();
4644
});
4745

48-
tape( 'the constructor throws an error if provided an invalid `aria` option', function test( t ) {
49-
var values;
50-
var i;
51-
52-
values = [
53-
'5',
54-
5,
55-
NaN,
56-
null,
57-
void 0,
58-
[],
59-
{},
60-
function noop() {}
61-
];
62-
for ( i = 0; i < values.length; i++ ) {
63-
t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
64-
}
65-
t.end();
66-
67-
function badValue( value ) {
68-
return function badValue() {
69-
var title = new Title({ // eslint-disable-line no-unused-vars
70-
'aria': value
71-
});
72-
};
73-
}
74-
});
75-
76-
tape( 'the constructor returns an instance having a `aria` property which throws an error if set to a non-boolean value', function test( t ) {
46+
tape( 'the constructor returns an instance having an `aria` property which throws an error if set to a non-boolean value', function test( t ) {
7747
var values;
7848
var i;
7949

@@ -100,10 +70,8 @@ tape( 'the constructor returns an instance having a `aria` property which throws
10070
}
10171
});
10272

103-
tape( 'the constructor returns an instance having a `aria` property', function test( t ) {
104-
var title;
105-
106-
title = new Title();
73+
tape( 'the constructor returns an instance having an `aria` property', function test( t ) {
74+
var title = new Title();
10775
t.strictEqual( title.aria, true, 'returns expected value' );
10876

10977
title = new Title({
@@ -119,10 +87,8 @@ tape( 'the constructor returns an instance having a `aria` property', function t
11987
t.end();
12088
});
12189

122-
tape( 'the constructor returns an instance having a `aria` property which can be set to a boolean', function test( t ) {
123-
var title;
124-
125-
title = new Title();
90+
tape( 'the constructor returns an instance having an `aria` property which can be set to a boolean', function test( t ) {
91+
var title = new Title();
12692

12793
title.aria = true;
12894
t.strictEqual( title.aria, true, 'returns expected value' );

lib/node_modules/@stdlib/plot/vega/title/ctor/test/test.baseline.js

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var tape = require( 'tape' );
2424
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
2525
var isUndefined = require( '@stdlib/assert/is-undefined' );
2626
var hasProp = require( '@stdlib/assert/has-property' );
27-
var isString = require( '@stdlib/assert/is-string' );
27+
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
2828
var Title = require( './../lib' );
2929

3030

@@ -37,9 +37,7 @@ tape( 'main export is a function', function test( t ) {
3737
});
3838

3939
tape( 'the constructor returns an instance which has a `baseline` property', function test( t ) {
40-
var v;
41-
42-
v = new Title();
40+
var v = new Title();
4341
t.strictEqual( hasOwnProp( v, 'baseline' ), false, 'returns expected value' );
4442
t.strictEqual( hasProp( v, 'baseline' ), true, 'returns expected value' );
4543
t.strictEqual( isUndefined( v.baseline ), true, 'returns expected value' );
@@ -52,34 +50,6 @@ tape( 'the constructor returns an instance which has a `baseline` property', fun
5250
t.end();
5351
});
5452

55-
tape( 'the constructor throws an error if provided an invalid `baseline` option', function test( t ) {
56-
var values;
57-
var i;
58-
59-
values = [
60-
5,
61-
NaN,
62-
null,
63-
true,
64-
false,
65-
[],
66-
{},
67-
function noop() {}
68-
];
69-
for ( i = 0; i < values.length; i++ ) {
70-
t.throws( badValue( values[ i ] ), Error, 'throws an error when provided ' + values[ i ] );
71-
}
72-
t.end();
73-
74-
function badValue( value ) {
75-
return function badValue() {
76-
var title = new Title({ // eslint-disable-line no-unused-vars
77-
'baseline': value
78-
});
79-
};
80-
}
81-
});
82-
8353
tape( 'the constructor returns an instance having a `baseline` property which throws an error if set to an invalid value', function test( t ) {
8454
var values;
8555
var i;
@@ -108,9 +78,7 @@ tape( 'the constructor returns an instance having a `baseline` property which th
10878
});
10979

11080
tape( 'the constructor returns an instance having a `baseline` property', function test( t ) {
111-
var title;
112-
113-
title = new Title();
81+
var title = new Title();
11482
t.strictEqual( isUndefined( title.baseline ), true, 'returns expected value' );
11583

11684
title = new Title({
@@ -126,10 +94,8 @@ tape( 'the constructor returns an instance having a `baseline` property', functi
12694
t.end();
12795
});
12896

129-
tape( 'the constructor returns an instance having a `baseline` property which can be set to a valid method', function test( t ) {
130-
var title;
131-
132-
title = new Title();
97+
tape( 'the constructor returns an instance having a `baseline` property which can be set to a valid value', function test( t ) {
98+
var title = new Title();
13399

134100
title.baseline = 'top';
135101
t.strictEqual( title.baseline, 'top', 'returns expected value' );

0 commit comments

Comments
 (0)