Skip to content

Commit

Permalink
chaijs 1.10 allows to write lint-friendly tests
Browse files Browse the repository at this point in the history
More details chaijs/chai#297
  • Loading branch information
johanneswuerbach committed Feb 5, 2015
1 parent b9469b0 commit d1cba18
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .jshintrc
Expand Up @@ -46,6 +46,5 @@
"strict": false,
"white": false,
"eqnull": true,
"esnext": true,
"expr": true
"esnext": true
}
2 changes: 1 addition & 1 deletion tests/describe-component-test.js
Expand Up @@ -82,7 +82,7 @@ describeComponent('pretty-color', {

it("has the correct className", function() {
// first call to this.$() renders the component.
expect(this.$().is('.pretty-color')).to.be.true;
expect(this.$().is('.pretty-color')).to.be.true();
});

it("uses the correct custom template", function() {
Expand Down
7 changes: 3 additions & 4 deletions tests/describe-model-test.js
Expand Up @@ -44,7 +44,7 @@ describeModel('whazzit', 'model:whazzit without adapter', {

it('model exists as subject', function() {
var model = this.subject();
expect(model).to.exist;
expect(model).to.exist();
expect(model).to.be.an.instanceof(DS.Model);
expect(model).to.be.an.instanceof(Whazzit);
});
Expand Down Expand Up @@ -86,13 +86,13 @@ describeModel('whazzit', 'model:whazzit with custom adapter', {
var model = this.subject(),
store = this.store();

expect(whazzitAdapterFindAllCalled).to.be.false;
expect(whazzitAdapterFindAllCalled).to.be.false();

store = this.store();

return Ember.run(function() {
return store.find('whazzit').then(function() {
expect(whazzitAdapterFindAllCalled).to.be.true;
expect(whazzitAdapterFindAllCalled).to.be.true();
done();
});
});
Expand Down Expand Up @@ -125,4 +125,3 @@ describeModel('whazzit', 'model:whazzit with application adapter', {
});

});

8 changes: 4 additions & 4 deletions tests/it-test.js
Expand Up @@ -42,13 +42,13 @@ describe('it', function() {
});

it('does not throw errors when you mark a pending spec', function() {
expect(pendingError).to.be.null;
expect(pendingError).to.be.null();
var pendingSpec = window.mocha.suite.suites.find(function(suite) {
return suite.tests.find(function(test) {
return test.title === 'is a pending spec';
});
});
expect(pendingSpec).to.be.ok;
expect(pendingSpec).to.be.ok();
});


Expand All @@ -67,13 +67,13 @@ describe('it', function() {
});

it('skips tests with the .skip modifier', function() {
expect(skippedError).to.be.null;
expect(skippedError).to.be.null();
var pendingSpec = Mocha.suite.suites.find(function(suite) {
return suite.tests.find(function(test) {
return test.title === 'a skipped spec';
});
});
expect(pendingSpec).to.be.defined;
expect(pendingSpec).to.be.defined();
});

var callback = function() {
Expand Down

0 comments on commit d1cba18

Please sign in to comment.