mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Refine _.isError checks to avoid false positives on plain objects.
This commit is contained in:
@@ -10425,6 +10425,12 @@
|
||||
assert.strictEqual(_.isError(symbol), false);
|
||||
});
|
||||
|
||||
QUnit.test('should return `false` for plain objects', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
assert.strictEqual(_.isError({ 'name': 'Error', 'message': '' }), false);
|
||||
});
|
||||
|
||||
QUnit.test('should work with an error object from another realm', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user