mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Simplify regexp test.
This commit is contained in:
@@ -2691,13 +2691,10 @@
|
|||||||
QUnit.test('`_.' + methodName + '` should clone `lastIndex` regexp property', function(assert) {
|
QUnit.test('`_.' + methodName + '` should clone `lastIndex` regexp property', function(assert) {
|
||||||
assert.expect(1);
|
assert.expect(1);
|
||||||
|
|
||||||
// Avoid a regexp literal for older Opera and use `exec` for older Safari.
|
var regexp = /c/g;
|
||||||
var regexp = RegExp('c', 'g');
|
|
||||||
|
|
||||||
regexp.exec('abcde');
|
regexp.exec('abcde');
|
||||||
|
|
||||||
var actual = func(regexp);
|
assert.strictEqual(func(regexp).lastIndex, 3);
|
||||||
assert.strictEqual(actual.lastIndex, 3);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('`_.' + methodName + '` should clone expando properties', function(assert) {
|
QUnit.test('`_.' + methodName + '` should clone expando properties', function(assert) {
|
||||||
|
|||||||
Reference in New Issue
Block a user