Lines Matching refs:isNativeError
154 assert.strictEqual(util.types.isNativeError(new Error()), true);
155 assert.strictEqual(util.types.isNativeError(new TypeError()), true);
156 assert.strictEqual(util.types.isNativeError(new SyntaxError()), true);
157 assert.strictEqual(util.types.isNativeError(new (context('Error'))()), true);
159 util.types.isNativeError(new (context('TypeError'))()),
163 util.types.isNativeError(new (context('SyntaxError'))()),
166 assert.strictEqual(util.types.isNativeError({}), false);
168 util.types.isNativeError({ name: 'Error', message: '' }),
171 assert.strictEqual(util.types.isNativeError([]), false);
173 util.types.isNativeError(Object.create(Error.prototype)),
177 util.types.isNativeError(new errors.codes.ERR_IPC_CHANNEL_CLOSED()),