Skip to content

Commit 8d2a6de

Browse files
committed
Add check to not bound when boundary null / undefined.
1 parent f488d58 commit 8d2a6de

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

spec/js/Preprocessor.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,16 @@ describe('Preprocessor', function () {
9191
var
9292
x = [],
9393
y = [],
94+
data = [x, y],
9495
i;
9596

9697
for (i = 0; i < 10; i++) {
9798
x.push(i);
9899
y.push(10 - 1 - i);
99100
}
100101

101-
preprocessor = new Preprocessor({ data : [x, y] });
102+
this.data = data;
103+
preprocessor = new Preprocessor({ data : data });
102104
});
103105

104106
afterEach(function () {
@@ -149,6 +151,12 @@ describe('Preprocessor', function () {
149151
[6, 5, 4, 3, 2]
150152
]);
151153
});
154+
155+
it('skips bounding when boundary null / undefined', function () {
156+
preprocessor.bound(null, undefined);
157+
expect(preprocessor.length()).toBe(10);
158+
expect(preprocessor.getData()).toBe(this.data);
159+
});
152160
});
153161

154162
describe('Subsample', function () {

0 commit comments

Comments
 (0)