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

Fix assertions in tests. #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
22 changes: 11 additions & 11 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('wrap-fn', function() {
it('should work if fn is undefined', function(done) {

function next(err, a, b) {
assert(this.ctx = 'ctx');
assert('ctx' == this.ctx);
assert('a' == a);
assert('b' == b);
assert(!err);
Expand All @@ -32,7 +32,7 @@ describe('wrap-fn', function() {
var called = 0;

function sync(a, b) {
assert(this.ctx = 'ctx');
assert('ctx' == this.ctx);
assert('a' == a);
assert('b' == b);
called++;
Expand All @@ -54,7 +54,7 @@ describe('wrap-fn', function() {

function sync(a, b) {
called++;
assert(this.ctx = 'ctx');
assert('ctx' == this.ctx);
assert('a' == a);
assert('b' == b);

Expand All @@ -76,7 +76,7 @@ describe('wrap-fn', function() {

function sync(a, b) {
called++;
assert(this.ctx = 'ctx');
assert('ctx' == this.ctx);
assert('a' == a);
assert('b' == b);

Expand All @@ -97,7 +97,7 @@ describe('wrap-fn', function() {
var called = 0;

function promise(a) {
assert(this.ctx = 'ctx');
assert('ctx' == this.ctx);
assert('a' == a);
called++;

Expand All @@ -122,7 +122,7 @@ describe('wrap-fn', function() {
var called = 0;

function promise(a, b) {
assert(this.ctx = 'ctx');
assert('ctx' == this.ctx);
assert('a' == a);
assert('b' == b);
called++;
Expand Down Expand Up @@ -150,7 +150,7 @@ describe('wrap-fn', function() {
var called = 0;

function async(a, b, fn) {
assert(this.ctx = 'ctx');
assert('ctx' == this.ctx);
assert('a' == a);
assert('b' == b);
called++;
Expand All @@ -173,7 +173,7 @@ describe('wrap-fn', function() {

function async(a, b, fn) {
called++;
assert(this.ctx = 'ctx');
assert('ctx' == this.ctx);
assert('a' == a);
assert('b' == b);
fn(new Error('some error'));
Expand All @@ -194,7 +194,7 @@ describe('wrap-fn', function() {

function async(a, b, fn) {
called++;
assert(this.ctx = 'ctx');
assert('ctx' == this.ctx);
assert('a' == a);
assert('b' == b);
throw new Error('some error');
Expand All @@ -216,7 +216,7 @@ describe('wrap-fn', function() {
var called = 0;

function *gen(a, b) {
assert(this.ctx = 'ctx');
assert('ctx' == this.ctx);
assert('a' == a);
assert('b' == b);
yield process.nextTick;
Expand All @@ -239,7 +239,7 @@ describe('wrap-fn', function() {

function *gen(a, b) {
called++;
assert(this.ctx = 'ctx');
assert('ctx' == this.ctx);
assert('a' == a);
assert('b' == b);
throw new Error('some error');
Expand Down