@@ -2,6 +2,7 @@ import { DummyManager, MockComm } from './dummy-manager';
2
2
3
3
import { expect } from 'chai' ;
4
4
5
+ import { IBackboneModelOptions } from '../../lib/' ;
5
6
import * as widgets from '../../lib/' ;
6
7
const WidgetModel = widgets . WidgetModel ;
7
8
@@ -82,7 +83,7 @@ describe('WidgetModel', function() {
82
83
model_id : 'widget' ,
83
84
widget_manager : this . manager ,
84
85
comm : this . comm
85
- }
86
+ } as IBackboneModelOptions
86
87
) ;
87
88
// Create some dummy deserializers. One returns synchronously, and the
88
89
// other asynchronously using a promise.
@@ -128,7 +129,7 @@ describe('WidgetModel', function() {
128
129
{
129
130
model_id : 'widget' ,
130
131
widget_manager : this . manager
131
- }
132
+ } as IBackboneModelOptions
132
133
) ;
133
134
expect ( widget . attributes ) . to . deep . equal ( {
134
135
...widget . defaults ( ) ,
@@ -143,7 +144,7 @@ describe('WidgetModel', function() {
143
144
{
144
145
model_id : 'widgetDead' ,
145
146
widget_manager : this . manager
146
- }
147
+ } as IBackboneModelOptions
147
148
) ;
148
149
expect ( widgetDead . model_id ) . to . equal ( 'widgetDead' ) ;
149
150
expect ( widgetDead . widget_manager ) . to . equal ( this . manager ) ;
@@ -157,7 +158,7 @@ describe('WidgetModel', function() {
157
158
model_id : 'widgetLive' ,
158
159
widget_manager : this . manager ,
159
160
comm : comm
160
- }
161
+ } as IBackboneModelOptions
161
162
) ;
162
163
expect ( widgetLive . model_id ) . to . equal ( 'widgetLive' ) ;
163
164
expect ( widgetLive . widget_manager ) . to . equal ( this . manager ) ;
@@ -171,7 +172,7 @@ describe('WidgetModel', function() {
171
172
{
172
173
model_id : 'widget' ,
173
174
widget_manager : this . manager
174
- }
175
+ } as IBackboneModelOptions
175
176
) ;
176
177
const x = await widget . state_change ;
177
178
expect ( x ) . to . be . undefined ;
@@ -193,7 +194,7 @@ describe('WidgetModel', function() {
193
194
model_id : 'widget' ,
194
195
widget_manager : this . manager ,
195
196
comm : comm
196
- }
197
+ } as IBackboneModelOptions
197
198
) ;
198
199
const data1 = { a : 1 , b : 'state' } ;
199
200
const data2 = { a : 2 , b : 'state' } ;
0 commit comments