mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Ensure punctuation is not treated as words. [closes #2268]
This commit is contained in:
15
test/test.js
15
test/test.js
@@ -24685,6 +24685,21 @@
|
||||
assert.deepEqual(actual, expected);
|
||||
});
|
||||
|
||||
QUnit.test('should not treat punctuation as words', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var marks = [
|
||||
'\u2012', '\u2013', '\u2014', '\u2015',
|
||||
'\u2024', '\u2025', '\u2026',
|
||||
'\u205d', '\u205e'
|
||||
];
|
||||
|
||||
var expected = lodashStable.map(marks, alwaysEmptyArray),
|
||||
actual = lodashStable.map(marks, _.words);
|
||||
|
||||
assert.deepEqual(actual, expected);
|
||||
});
|
||||
|
||||
QUnit.test('should support a `pattern` argument', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user