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

Test case not testing anything (constructor bubbling) #25

Open
bcowgill opened this issue Feb 15, 2015 · 0 comments
Open

Test case not testing anything (constructor bubbling) #25

bcowgill opened this issue Feb 15, 2015 · 0 comments

Comments

@bcowgill
Copy link

This test case will show green even when it fails:
Commenting out the Baz initialize function shows a test pass.
You need to change ok(false,...) in both Foo and Bar's initialize function to have an actual test.

test('object literal with initialize shouldn't bubble constructor', 1, function () {
var Foo = $k({
initialize: function() {
ok(true, 'object literal with initialize shouldn't bubble constructor');
}
});

var Bar = Foo.extend({
  initialize: function() {
    ok(true, 'object literal with initialize shouldn\'t bubble constructor');
  }
});

var Baz = Bar.extend({
  initialize: function() {
    ok(true, 'object literal with initialize shouldn\'t bubble constructor');
  }
});

//should only fire Baz's init
var baz = new Baz();

})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant