We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd65d41 commit 3d5d622Copy full SHA for 3d5d622
1 file changed
test/tests.js
@@ -133,4 +133,27 @@ module.exports = function (arrayWith, t) {
133
134
st.end();
135
});
136
+
137
+ t.test('test262: test/built-ins/Array/prototype/with/index-throw-completion', function (st) {
138
+ function MyError() {} // eslint-disable-line func-style
139
140
+ var index = {
141
+ valueOf: function () { throw new MyError(); }
142
+ };
143
144
+ st['throws'](
145
+ function () { arrayWith([], index, null); },
146
+ MyError,
147
+ 'throws on index valueOf'
148
+ );
149
150
+ st.end();
151
+ });
152
153
+ t.test('test262: test/built-ins/Array/prototype/with/negative-fractional-index-truncated-to-zero', function (st) {
154
+ var result = arrayWith([0], -0.5, 123);
155
+ st.equal(result[0], 123);
156
157
158
159
};
0 commit comments