Skip to content

Commit 47edbdd

Browse files
committed
Remove obsolete test
1 parent 551e995 commit 47edbdd

File tree

1 file changed

+0
-65
lines changed
  • lib/node_modules/@stdlib/stats/iter/cumeanabs2/test

1 file changed

+0
-65
lines changed

lib/node_modules/@stdlib/stats/iter/cumeanabs2/test/test.js

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -104,71 +104,6 @@ tape( 'the function returns an iterator protocol-compliant object which iterativ
104104
t.end();
105105
});
106106

107-
tape( 'the function returns an iterator protocol-compliant object which iteratively computes a cumulative arithmetic mean of squared absolute values (value+done)', function test( t ) {
108-
var expected;
109-
var actual;
110-
var values;
111-
var delta;
112-
var tol;
113-
var it;
114-
var v;
115-
var i;
116-
117-
values = [ 2.0, -3.0, -2.0, 4.0, -3.0, -4.0 ];
118-
expected = [ 4.0/1.0, 13.0/2.0, 17.0/3.0, 33.0/4.0, 42.0/5.0, 58.0/6.0 ];
119-
120-
it = itercumeanabs2( createIterator( values ) );
121-
t.equal( it.next.length, 0, 'has zero arity' );
122-
123-
for ( i = 0; i < values.length; i++ ) {
124-
v = it.next();
125-
t.equal( typeof v.value, 'number', 'returns a number' );
126-
t.equal( typeof v.done, 'boolean', 'returns a boolean' );
127-
128-
actual = v.value;
129-
if ( actual === expected[i] ) {
130-
t.equal( actual, expected[i], 'returns expected value' );
131-
} else {
132-
delta = abs( expected[i] - actual );
133-
tol = 1.0 * EPS * abs( expected[i] );
134-
t.equal( delta <= tol, true, 'within tolerance. Actual: '+actual+'. Expected: '+expected[i]+'. Delta: '+delta+'. Tol: '+tol+'.' );
135-
}
136-
}
137-
v = it.next();
138-
t.equal( v.value, void 0, 'returns expected value' );
139-
t.equal( v.done, true, 'returns expected value' );
140-
141-
t.end();
142-
143-
function createIterator( arr ) {
144-
var len;
145-
var it;
146-
var i;
147-
148-
len = arr.length;
149-
i = -1;
150-
151-
it = {};
152-
it.next = next;
153-
154-
return it;
155-
156-
function next() {
157-
var out;
158-
i += 1;
159-
if ( i < len ) {
160-
out = {};
161-
out.value = arr[ i ];
162-
out.done = ( i === len-1 );
163-
return out;
164-
}
165-
return {
166-
'done': true
167-
};
168-
}
169-
}
170-
});
171-
172107
tape( 'if an iterated value is a non-numeric value, the computed mean is `NaN`', function test( t ) {
173108
var expected;
174109
var values;

0 commit comments

Comments
 (0)