Skip to content

Commit 174856c

Browse files
committed
squash: adjust test
1 parent ea41944 commit 174856c

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

test/parallel/test-internal-util-objects.js

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,35 @@ Object.prototype.blep = 'blop';
2929
Object.getOwnPropertyNames(kEnumerableProperty),
3030
[ 'enumerable' ]
3131
);
32-
assert.strictEqual(
33-
Object.isExtensible(kEnumerableProperty),
34-
false
35-
);
36-
assert.strictEqual(
37-
Object.isSealed(kEnumerableProperty),
38-
true
32+
33+
assert.throws(
34+
() => Object.setPrototypeOf(kEnumerableProperty, { value: undefined }),
35+
TypeError
3936
);
40-
assert.strictEqual(
41-
Object.isFrozen(kEnumerableProperty),
42-
true
37+
assert.throws(
38+
() => delete kEnumerableProperty.enumerable,
39+
TypeError
4340
);
44-
4541
assert.throws(
4642
() => kEnumerableProperty.enumerable = false,
4743
TypeError
4844
);
45+
assert.throws(
46+
() => Object.assign(kEnumerableProperty, { enumerable: false }),
47+
TypeError
48+
);
49+
assert.throws(
50+
() => kEnumerableProperty.value = undefined,
51+
TypeError
52+
);
53+
assert.throws(
54+
() => Object.assign(kEnumerableProperty, { value: undefined }),
55+
TypeError
56+
);
57+
assert.throws(
58+
() => Object.defineProperty(kEnumerableProperty, 'value', {}),
59+
TypeError
60+
);
4961
}
5062

5163
{

0 commit comments

Comments
 (0)