Skip to content

Commit eb4d1f0

Browse files
committed
Add test for streaming mode w/ allowable_tags.
1 parent adf53b6 commit eb4d1f0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/striptags-test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,5 +144,17 @@ describe('striptags', function() {
144144
assert.equal(part_two, 'dolor sit ');
145145
assert.equal(part_three, '< amet');
146146
});
147+
148+
it('should work with allowable_tags', function() {
149+
let striptags_stream = striptags.init_streaming_mode(['strong']);
150+
151+
let part_one = striptags_stream('lorem ipsum <stro');
152+
let part_two = striptags_stream('ng>dolor sit <');
153+
let part_three = striptags_stream(' amet');
154+
155+
assert.equal(part_one, 'lorem ipsum ');
156+
assert.equal(part_two, '<strong>dolor sit ');
157+
assert.equal(part_three, '< amet');
158+
});
147159
});
148160
});

0 commit comments

Comments
 (0)