Skip to content

Commit 871efb6

Browse files
committed
Fix tests
1 parent c7fbb7d commit 871efb6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

test.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
'use strict'
22

33
var wfunc = require('./')
4+
var applyWindow = require('./apply')
5+
var generateWindow = require('./generate')
46
var t = require('tape')
57

68

@@ -42,21 +44,21 @@ t('window functions return a finite number',function(t) {
4244

4345
t('applies a window to a signal',function(t) {
4446
var x = [1, 1, 1, 1, 1]
45-
var y = wfunc.apply( x, wfunc.hamming )
47+
var y = applyWindow( x, wfunc.hamming )
4648
t.equal(y.length, x.length)
4749
t.end()
4850
})
4951

5052
t('passes extra arguments to a window function',function(t) {
5153
var x = [1, 1, 1, 1, 1]
52-
wfunc.apply( x, wfunc.gaussian, 0.1 )
54+
applyWindow( x, wfunc.gaussian, 0.1 )
5355
t.ok( isFinite(x[0]), 'samples are finite' )
5456
t.ok( x[0] < 1e-8, 'samples have been windowed' )
5557
t.end()
5658
})
5759

5860
t('constructs an window function array',function(t) {
59-
var x = wfunc.generate( wfunc.hamming, 100 )
61+
var x = generateWindow( wfunc.hamming, 100 )
6062
t.ok( Array.isArray(x) )
6163
t.equal( x.length, 100 )
6264
t.ok( isFinite(x[50]) )

0 commit comments

Comments
 (0)