Skip to content

Commit

Permalink
[Tests] handle Function.prototype in Opera 12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 15, 2022
1 parent 316d676 commit f3b8f9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/tests.js
Expand Up @@ -51,8 +51,8 @@ module.exports = function (getName, t) {
t.test('Function.prototype.name', function (st) {
st.equal(getName(function before() {}), 'before', 'function prior to accessing Function.prototype has the right name');
var protoName = getName(Function.prototype);
// on <= node v2.5, this is "Empty" - otherwise, the empty string
st.equal(protoName === '' || protoName === 'Empty', true, 'Function.prototype has the right name');
// on <= node v2.5, this is "Empty"; on Opera 12.1, "Function.prototype" - otherwise, the empty string
st.equal(protoName === '' || protoName === 'Empty' || protoName === 'Function.prototype', true, 'Function.prototype has the right name');
st.equal(getName(function after() {}), 'after', 'function after accessing Function.prototype has the right name');

st.end();
Expand Down

0 comments on commit f3b8f9a

Please sign in to comment.