Skip to content

Commit

Permalink
test: missing return statements in chai-as-promise tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-scherzinger committed Feb 9, 2017
1 parent 685f858 commit 486b5ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions test/Account.test.js
Expand Up @@ -146,7 +146,7 @@ describe('Accounts class', () => {
.and.notify(() => stub.restore());
});
it('should be rejected on undefined email', () => {
new Accounts().emailAvailable().should.be.rejectedWith(Error);
return new Accounts().emailAvailable().should.be.rejectedWith(Error);
});
it('should signup new account', () => {
const accounts = new Accounts();
Expand All @@ -172,10 +172,10 @@ describe('Accounts class', () => {
});
});
it('should be rejected on undefined email', () => {
new Accounts().signup(null, 'supersecure').should.be.rejectedWith(Error);
return new Accounts().signup(null, 'supersecure').should.be.rejectedWith(Error);
});
it('should be rejected on undefined password', () => {
new Accounts().signup('someone@example.com', null).should.be.rejectedWith(Error);
return new Accounts().signup('someone@example.com', null).should.be.rejectedWith(Error);
});
it('should be rejected on undefined clientID', () => {
new Accounts().signup('someone@example.com', 'supersecure').should.be.rejectedWith(Error);
Expand All @@ -196,10 +196,10 @@ describe('Accounts class', () => {
});
});
it('should be rejected on undefined email', () => {
new Accounts().resetPassword().should.be.rejectedWith(Error);
return new Accounts().resetPassword().should.be.rejectedWith(Error);
});
it('should be rejected on undefiend clientID', () => {
new Accounts().resetPassword('someone@entrecode.de').should.be.rejectedWith(Error);
return new Accounts().resetPassword('someone@entrecode.de').should.be.rejectedWith(Error);
});
it('should change email', () => {
const accounts = new Accounts();
Expand All @@ -217,15 +217,15 @@ describe('Accounts class', () => {
});
});
it('should be rejected on undefined email', () => {
new Accounts().changeEmail().should.be.rejectedWith(Error);
return new Accounts().changeEmail().should.be.rejectedWith(Error);
});
it('should be rejected on undefiend token', () => {
const reject = () => {
const accounts = new Accounts();
accounts.tokenStore.del();
return accounts.changeEmail('someone@entrecode.de');
};
reject().should.be.rejectedWith(Error);
return reject().should.be.rejectedWith(Error);
});
});

Expand Down
6 changes: 3 additions & 3 deletions test/DataManager.test.js
Expand Up @@ -234,10 +234,10 @@ describe('DataManager Resource', () => {
.catch(() => stub.restore());
});
it('should throw on model list filtered with modelID', () => {
resource.modelList({ modelID: 'id' }).should.be.rejectedWith(Error);
return resource.modelList({ modelID: 'id' }).should.be.rejectedWith(Error);
});
it('should be rejected on model list filtered with modelID and dataManagerID', () => {
resource.modelList({ modelID: 'id' }).should.be.rejectedWith(Error);
return resource.modelList({ modelID: 'id' }).should.be.rejectedWith(Error);
});
it('should load model resource', () => {
const stub = sinon.stub(helper, 'get');
Expand All @@ -251,6 +251,6 @@ describe('DataManager Resource', () => {
.catch(() => stub.restore());
});
it('should be rejected on undefined modelID', () => {
resource.model().should.be.rejectedWith(Error);
return resource.model().should.be.rejectedWith(Error);
});
});

0 comments on commit 486b5ec

Please sign in to comment.