Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fulfill or betray promises #68

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c291a07
add `promise` method
jandockx Aug 19, 2017
f7bcc4e
add `promise` documentation
jandockx Aug 19, 2017
a64f863
add unit test for `promise` - ok for failures, but fails for things t…
jandockx Aug 19, 2017
ece3d5c
`promise` is a function, not a property with a getter
jandockx Aug 19, 2017
45d510e
remove NOK warning - promise tests are green
jandockx Aug 19, 2017
66c5ae7
add nop helper function for `fulfill` and `betray`
jandockx Aug 19, 2017
d3a71d1
add `fulfill` method
jandockx Aug 19, 2017
bb50814
add `fulfill` documentation
jandockx Aug 19, 2017
9e14a5f
`fulfill` is a function, not a property with a getter
jandockx Aug 19, 2017
592807a
add `betray` method
jandockx Aug 19, 2017
ef3fb0f
add `betray` documentation
jandockx Aug 19, 2017
c06a334
`betray` is a function, not a property with a getter
jandockx Aug 19, 2017
1cb2baf
add new methods to TS definition
jandockx Aug 19, 2017
8c61412
generalise failing promise tests
jandockx Aug 19, 2017
b737286
fix mistake in promise_test
jandockx Aug 19, 2017
3d8a5ea
Copy Promise require from resolve test, and remove optionality of Pro…
jandockx Aug 19, 2017
e6fc085
Refactor isPromise test out, and repeat a little code, to get a good …
jandockx Aug 19, 2017
46b67ff
fix a bug: make sure result of resolve or reject is propagated also w…
jandockx Aug 19, 2017
ce39985
Make clear that not is confusing in documentation (it is not being te…
jandockx Aug 19, 2017
8711db1
Add GREEN tests for `fulfill`
jandockx Aug 19, 2017
524f87b
add unit tests for `betray`, with 1 particular annoying test still fa…
jandockx Aug 19, 2017
1be6601
cleanup (removing unused code) of fulfill test
jandockx Aug 19, 2017
03bb54c
marked test that has issues
jandockx Aug 19, 2017
43b4ede
fixed broken test
jandockx Aug 19, 2017
0117313
deal with UnhandledPromiseRejectionWarning
jandockx Aug 19, 2017
e753a56
add Node v8 (LTS) to supported Node versions ("node" is now v9)
jandockx Dec 11, 2017
a112127
fix mocha timeout with node 0.10 - we now get clear failing tests
jandockx Dec 11, 2017
c77e39c
fix the problem with Promise stringification in test in Node 0.10 by …
jandockx Dec 11, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
betray is a function, not a property with a getter
  • Loading branch information
jandockx committed Aug 31, 2017
commit c06a3343175cb78eb3ac087935a658f134978558
4 changes: 2 additions & 2 deletions must.js
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ Must.prototype.fulfill = function(fulfilledCondition) {
* @method betray
* @param catchCondition
*/
defineGetter(Must.prototype, "betray", function(catchCondition) {
Must.prototype.betray = function(catchCondition) {
var must = this
must.promise()
return must.actual.then(
Expand All @@ -1314,7 +1314,7 @@ defineGetter(Must.prototype, "betray", function(catchCondition) {
},
catchCondition || nop
)
})
}

/**
* Assert a string starts with the given string.
Expand Down