Skip to content

Commit 22b46d3

Browse files
committed
Add some whitespace tests
1 parent 28ffc13 commit 22b46d3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ describe('phone-regex', function() {
3232
it('should not find a phone number if it is not exact', function() {
3333
assert.equal(phone({ exact: true }).test('apples 1 123 456 7890'), false);
3434
});
35+
36+
it('should not find a phone number if there is leading whitespace', function() {
37+
assert.equal(phone({ exact: true }).test(' 1 123 456 7890'), false);
38+
});
39+
40+
it('should not find a phone number if there is trailing whitespace', function() {
41+
assert.equal(phone({ exact: true }).test('1 123 456 7890 '), false);
42+
});
3543
});
3644

3745
describe('g', function() {

0 commit comments

Comments
 (0)