Skip to content

Commit 05d92c6

Browse files
committed
Add tests for has_model
1 parent 7e260ad commit 05d92c6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/base-manager/test/src/manager_test.ts

+12
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,18 @@ describe('ManagerBase', function () {
152152
});
153153
});
154154

155+
describe('has_model', function () {
156+
it('returns true when the model is registered', async function () {
157+
const manager = this.managerBase;
158+
const model = await manager.new_model(this.modelOptions);
159+
expect(manager.has_model(model.model_id)).to.be.true;
160+
});
161+
162+
it('returns false when the model is not registered', function () {
163+
expect(this.managerBase.has_model('not-defined')).to.be.false;
164+
});
165+
});
166+
155167
describe('handle_comm_open', function () {
156168
it('returns a promise to a model', async function () {
157169
const manager = this.managerBase;

0 commit comments

Comments
 (0)