Skip to content

Commit 903d1ef

Browse files
author
Walker Leite
committed
feat(Account): add declaration tests and loopback-chai support
1 parent 08e5ece commit 903d1ef

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

template/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"karma-chai": "^0.1.0",
7676
"karma-mocha": "^1.3.0",
7777
"karma-chrome-launcher": "^2.2.0",
78+
"loopback-chai": "^2.2.0",
7879
"mocha": "^3.4.2",
7980
"sinon": "^2.3.8",
8081
"tmp": "0.0.33",

template/test/mocha.conf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import chai from 'chai';
22
import chaiHttp from 'chai-http';
3+
import loopbackChai from 'loopback-chai';
34

45
chai.use(chaiHttp);
56

template/test/server/account.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ describe('Account', () => {
2020
app.close();
2121
});
2222

23+
it('has been correctly declared', () => {
24+
expect(Account).to.inherits(app.models.User);
25+
});
26+
2327
it('should send reset email to test user', () => request(app)
2428
.post('/api/Accounts/reset')
2529
.send({email})

0 commit comments

Comments
 (0)