Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 32450b4

Browse files
jugglinmikeMs2ger
authored andcommitted
[js] Remove invalid tests for JavaScript built-ins
The 2015 edition of ECMAScript modified the semantics of a number of built-in methods to tolerate non-object values [1]. The tests asserting a TypeError under these conditions are no longer valid. [1] https://tc39.github.io/ecma262/#sec-additions-and-changes-that-introduce-incompatibilities-with-prior-editions
1 parent cffb370 commit 32450b4

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

js/builtins/Object.prototype.freeze.html

-8
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@
3838
assert_equals('exist', that.prop, 'Confirm to prevent deleting a property.');
3939
});
4040
});
41-
42-
43-
test(function() {
44-
['foo', 42, null, undefined].forEach(function(that) {
45-
assert_throws(new TypeError(),
46-
function() { Object.freeze(that) });
47-
});
48-
});
4941
</script>
5042

5143
</body>

js/builtins/Object.prototype.preventExtensions.html

-7
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@
3838
assert_equals(undefined, that.prop, 'Confirm to be able to delete a property.');
3939
});
4040
});
41-
42-
test(function() {
43-
['foo', 42, null, undefined].forEach(function(that) {
44-
assert_throws(new TypeError(),
45-
function() { Object.preventExtensions(that) });
46-
});
47-
});
4841
</script>
4942

5043
</body>

js/builtins/Object.prototype.seal.html

-7
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@
3838
assert_equals('changed', that.prop, 'Confirm to prevent deleting a property.');
3939
});
4040
});
41-
42-
test(function() {
43-
['foo', 42, null, undefined].forEach(function(that) {
44-
assert_throws(new TypeError(),
45-
function() { Object.seal(that) });
46-
});
47-
});
4841
</script>
4942

5043
</body>

0 commit comments

Comments
 (0)