Skip to content

Commit 3e75849

Browse files
committed
test(tests): Modify test for the init method
The test for the init method is updated in order to take into account the new optional parameter and the sequelize object binding.
1 parent 1447a47 commit 3e75849

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/test.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,16 @@ describe('hapi-starter-kit', () => {
6464
expect(() => starterKit.init(config)).to.throw('You should call init() only once.');
6565
});
6666

67-
it('should set the config and server objects', () => {
67+
it('should set the config, server and sequelize objects', () => {
68+
const resultingConfig = Object.assign({}, config);
69+
70+
// Default config if not provided.
71+
resultingConfig.database.modelPaths = ['lib/**/model.js', 'lib/**/models/*.js'];
72+
6873
starterKit.init(config);
69-
expect(starterKit.config).to.equal(config);
74+
expect(starterKit.config).to.deep.equal(resultingConfig);
7075
expect(starterKit.server).to.be.an('object');
76+
expect(starterKit.sequelize).to.be.an('object');
7177
});
7278
});
7379

0 commit comments

Comments
 (0)