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

client service wrappers don't return promise #20

Closed
beeplin opened this Issue Nov 10, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@beeplin
Copy link

beeplin commented Nov 10, 2016

The docs said:

The wrappers return a Promise unless a callback is provided. See example/ for a working example of wrapper usage.

but actually in client.js, for example:

	this.emailChange = (password, email, user, cb) => {
		verifyReset.create({
			action: 'emailChange',
			value: {
				password,
				email
			},
		}, {
			user
		}, cb);
	};

These wrappers return nothing. should be:

	this.emailChange = (password, email, user, cb) => {
		return verifyReset.create({ // add 'return' here
			action: 'emailChange',
			value: {
				password,
				email
			},
		}, {
			user
		}, cb);
	};
@eddyystop

This comment has been minimized.

Copy link
Owner

eddyystop commented Nov 10, 2016

Thanks. I'll look into this when I'm free.

On Thu, Nov 10, 2016 at 6:08 AM, Beep LIN notifications@github.com wrote:

The docs said:

The wrappers return a Promise unless a callback is provided. See example/
for a working example of wrapper usage.

but actually in client.js, for example:

this.emailChange = (password, email, user, cb) => {
verifyReset.create({
action: 'emailChange',
value: {
password,
email
},
}, {
user
}, cb);
};

These wrappers return nothing. should be:

this.emailChange = (password, email, user, cb) => {
return verifyReset.create({ // add 'return' here
action: 'emailChange',
value: {
password,
email
},
}, {
user
}, cb);
};


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#20,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABeznzjII_8QGPamu8XbstqgGgPhk6KVks5q8vtHgaJpZM4Kuid0
.

@eddyystop

This comment has been minimized.

Copy link
Owner

eddyystop commented Nov 17, 2016

v1.0.1: client.js now returns Promises as documented

wrapper.test.js effectively no-op'ed all its callback tests, testing nothing. This was fixed. Tests for promises were added.

@eddyystop eddyystop closed this Nov 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.