-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.js
More file actions
30 lines (26 loc) · 746 Bytes
/
test.js
File metadata and controls
30 lines (26 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*!
* punctuation-regex <https://github.com/regexps/punctuation-regex>
*
* Copyright (c) 2016 Jon Schlinkert.
* Licensed under the MIT license.
*/
'use strict';
require('mocha');
var assert = require('assert');
var regex = require('./');
describe('punctuation-regex', function() {
it('should match punctuation', function () {
assert(!regex().test('foo'));
assert(!regex().test('bar!'));
assert(regex().test('!'));
assert(regex().test('@'));
assert(regex().test('$'));
assert(regex().test('&'));
assert(regex().test('/'));
assert(regex().test('*'));
});
it('should match extended punctuation characters', function () {
assert(!regex().test('‘'));
assert(regex(true).test('‘'));
});
});