Skip to content

Commit

Permalink
[Tests] fix tag helper, from bb50ea2
Browse files Browse the repository at this point in the history
 - Skipped failing “fake error” test when testing the library, because Error objects lack a robust way to distinguish them in JS
  • Loading branch information
ljharb committed Mar 6, 2020
1 parent a3d8677 commit 469f008
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/cmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var buffersAreTypedArrays = typeof Buffer === 'function' && new Buffer(0) instan
var isNode = typeof process === 'object' && typeof process.version === 'string';

function tag(obj, value) {
if (hasSymbols && Symbol.toStringTags && Object.defineProperty) {
if (hasSymbols && Symbol.toStringTag && Object.defineProperty) {
Object.defineProperty(obj, Symbol.toStringTag, {
value: value
});
Expand Down Expand Up @@ -917,7 +917,7 @@ test('Errors', function (t) {
false
);

t.test('fake error', { skip: !hasDunderProto }, function (st) {
t.test('fake error', { skip: !process.env.ASSERT || !hasDunderProto }, function (st) {
var a = tag({
__proto__: null
}, 'Error');
Expand Down

0 comments on commit 469f008

Please sign in to comment.