mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 16:04:36 +02:00
Add Promise#finally invoked on thenable test (#2312)
* Rename proxy context test * Add thenable context test
This commit is contained in:
parent
0a1e35d3db
commit
8042c57d9b
17
test/built-ins/Promise/prototype/finally/this-value-thenable.js
vendored
Normal file
17
test/built-ins/Promise/prototype/finally/this-value-thenable.js
vendored
Normal file
@ -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
|
||||||
|
);
|
Loading…
x
Reference in New Issue
Block a user