From 78fa12bdab002fa00437eb1b80ef11d5d079f9ff Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Thu, 17 Jun 2021 12:17:57 +0200 Subject: [PATCH] Fix backbone types in tests --- packages/base/test/src/widget_test.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/base/test/src/widget_test.ts b/packages/base/test/src/widget_test.ts index 2434ae3d16..6df9a63ec6 100644 --- a/packages/base/test/src/widget_test.ts +++ b/packages/base/test/src/widget_test.ts @@ -2,6 +2,7 @@ import { DummyManager, MockComm } from './dummy-manager'; import { expect } from 'chai'; +import { IBackboneModelOptions } from '../../lib/'; import * as widgets from '../../lib/'; const WidgetModel = widgets.WidgetModel; @@ -82,7 +83,7 @@ describe('WidgetModel', function() { model_id: 'widget', widget_manager: this.manager, comm: this.comm - } + } as IBackboneModelOptions ); // Create some dummy deserializers. One returns synchronously, and the // other asynchronously using a promise. @@ -128,7 +129,7 @@ describe('WidgetModel', function() { { model_id: 'widget', widget_manager: this.manager - } + } as IBackboneModelOptions ); expect(widget.attributes).to.deep.equal({ ...widget.defaults(), @@ -143,7 +144,7 @@ describe('WidgetModel', function() { { model_id: 'widgetDead', widget_manager: this.manager - } + } as IBackboneModelOptions ); expect(widgetDead.model_id).to.equal('widgetDead'); expect(widgetDead.widget_manager).to.equal(this.manager); @@ -157,7 +158,7 @@ describe('WidgetModel', function() { model_id: 'widgetLive', widget_manager: this.manager, comm: comm - } + } as IBackboneModelOptions ); expect(widgetLive.model_id).to.equal('widgetLive'); expect(widgetLive.widget_manager).to.equal(this.manager); @@ -171,7 +172,7 @@ describe('WidgetModel', function() { { model_id: 'widget', widget_manager: this.manager - } + } as IBackboneModelOptions ); const x = await widget.state_change; expect(x).to.be.undefined; @@ -193,7 +194,7 @@ describe('WidgetModel', function() { model_id: 'widget', widget_manager: this.manager, comm: comm - } + } as IBackboneModelOptions ); const data1 = { a: 1, b: 'state' }; const data2 = { a: 2, b: 'state' };