Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rsvp.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
rsvp.js
Commits
b2c76d2e
Commit
b2c76d2e
authored
Jan 27, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Queue: ensure Queue arguments are propagated without new
parent
27cc7f68
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
lib/rsvp/queue.js
lib/rsvp/queue.js
+1
-1
test/tests/extension_test.js
test/tests/extension_test.js
+10
-0
No files found.
lib/rsvp/queue.js
View file @
b2c76d2e
...
...
@@ -21,7 +21,7 @@ var Queue = function(thenable) {
resolved
;
if
(
!
(
this
instanceof
Queue
))
{
return
new
Queue
();
return
new
Queue
(
thenable
);
}
function
canceller
()
{
...
...
test/tests/extension_test.js
View file @
b2c76d2e
...
...
@@ -2265,6 +2265,16 @@ describe("`RSVP.Queue`", function () {
},
20
);
});
it
(
'
should be fulfilled without new with the thenable argument
'
,
function
(
done
)
{
var
queue
=
RSVP
.
Queue
(
RSVP
.
resolve
(
'
bar
'
));
setTimeout
(
function
()
{
assert
.
equal
(
queue
.
isFulfilled
,
true
);
assert
.
equal
(
queue
.
fulfillmentValue
,
'
bar
'
);
done
();
},
20
);
});
it
(
'
should be rejected with the rejected thenable argument
'
,
function
(
done
)
{
var
queue
=
new
RSVP
.
Queue
(
RSVP
.
reject
(
'
ko
'
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment