diff --git a/test/built-ins/Promise/prototype/finally/this-value-non-promise.js b/test/built-ins/Promise/prototype/finally/this-value-proxy.js similarity index 100% rename from test/built-ins/Promise/prototype/finally/this-value-non-promise.js rename to test/built-ins/Promise/prototype/finally/this-value-proxy.js diff --git a/test/built-ins/Promise/prototype/finally/this-value-thenable.js b/test/built-ins/Promise/prototype/finally/this-value-thenable.js new file mode 100644 index 0000000000..9fe927ac5b --- /dev/null +++ b/test/built-ins/Promise/prototype/finally/this-value-thenable.js @@ -0,0 +1,17 @@ +// Copyright (C) 2019 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-promise.prototype.finally +description: > + Promise.prototype.finally invoked on thenable returns result of "then" call. +features: [Promise.prototype.finally] +---*/ + +var thenResult = {}; +var Thenable = function() {}; +Thenable.prototype.then = function() { return thenResult; }; + +assert.sameValue( + Promise.prototype.finally.call(new Thenable()), + thenResult +);