@@ -70,7 +70,7 @@ describe('scopes', () => {
70
70
71
71
it ( 'should consider other scopes' , ( ) =>
72
72
73
- ( ShoeWithScopes . scope ( 'full' ) as typeof ShoeWithScopes ) . findOne ( )
73
+ ShoeWithScopes . scope ( 'full' ) . findOne ( )
74
74
. then ( shoe => {
75
75
76
76
expect ( shoe ) . to . have . property ( 'manufacturer' ) . which . is . not . null ;
@@ -89,8 +89,8 @@ describe('scopes', () => {
89
89
) ;
90
90
91
91
it ( 'should not consider default scope due to unscoped call' , ( ) =>
92
- ( ShoeWithScopes
93
- . unscoped ( ) as typeof ShoeWithScopes )
92
+ ShoeWithScopes
93
+ . unscoped ( )
94
94
. findOne ( )
95
95
. then ( shoe => {
96
96
expect ( shoe ) . to . have . property ( 'secretKey' ) . which . is . a ( 'string' ) ;
@@ -101,7 +101,7 @@ describe('scopes', () => {
101
101
102
102
it ( 'should consider scopes and additional included model (object)' , ( ) =>
103
103
expect (
104
- ( ShoeWithScopes . scope ( 'full' ) as typeof ShoeWithScopes )
104
+ ShoeWithScopes . scope ( 'full' )
105
105
. findOne ( {
106
106
include : [ {
107
107
model : Person ,
@@ -117,7 +117,7 @@ describe('scopes', () => {
117
117
118
118
it ( 'should consider scopes and additional included model (model)' , ( ) =>
119
119
expect (
120
- ( ShoeWithScopes . scope ( 'full' ) as typeof ShoeWithScopes )
120
+ ShoeWithScopes . scope ( 'full' )
121
121
. findOne ( {
122
122
include : [ Person ]
123
123
} )
@@ -131,7 +131,7 @@ describe('scopes', () => {
131
131
132
132
it ( 'should not consider default scope due to unscoped call, but additonal includes (object)' , ( ) =>
133
133
134
- ( ShoeWithScopes . unscoped ( ) as typeof ShoeWithScopes )
134
+ ShoeWithScopes . unscoped ( )
135
135
. findOne ( {
136
136
include : [ { model : Person } ]
137
137
} )
@@ -143,8 +143,8 @@ describe('scopes', () => {
143
143
144
144
it ( 'should not consider default scope due to unscoped call, but additonal includes (model)' , ( ) =>
145
145
146
- ( ShoeWithScopes
147
- . unscoped ( ) as typeof ShoeWithScopes )
146
+ ShoeWithScopes
147
+ . unscoped ( )
148
148
. findOne ( {
149
149
include : [ Person ]
150
150
} )
@@ -169,7 +169,7 @@ describe('scopes', () => {
169
169
) ;
170
170
171
171
it ( 'should consider scope of included model (with own scope)' , ( ) =>
172
- ( ShoeWithScopes . scope ( 'red' ) as typeof ShoeWithScopes )
172
+ ShoeWithScopes . scope ( 'red' )
173
173
. findOne ( {
174
174
include : [ Manufacturer . scope ( 'brandOnly' ) as typeof Manufacturer ]
175
175
} )
@@ -187,7 +187,7 @@ describe('scopes', () => {
187
187
describe ( 'with nested scope' , ( ) => {
188
188
189
189
it ( 'should consider nested scope' , ( ) =>
190
- ( ShoeWithScopes . scope ( 'manufacturerWithScope' ) as typeof ShoeWithScopes )
190
+ ShoeWithScopes . scope ( 'manufacturerWithScope' )
191
191
. findOne ( )
192
192
. then ( shoe => {
193
193
expect ( shoe ) . to . have . property ( 'manufacturer' )
@@ -197,7 +197,7 @@ describe('scopes', () => {
197
197
) ;
198
198
199
199
it ( 'should not consider nested scope' , ( ) =>
200
- ( ShoeWithScopes . scope ( 'full' ) as typeof ShoeWithScopes )
200
+ ShoeWithScopes . scope ( 'full' )
201
201
. findOne ( )
202
202
. then ( shoe => {
203
203
expect ( shoe ) . to . have . property ( 'manufacturer' )
@@ -211,15 +211,15 @@ describe('scopes', () => {
211
211
describe ( 'with scope function' , ( ) => {
212
212
213
213
it ( 'should find appropriate shoe due to correctly passed scope function param' , ( ) =>
214
- ( ShoeWithScopes . scope ( { method : [ 'primaryColor' , 'red' ] } ) as typeof ShoeWithScopes )
214
+ ShoeWithScopes . scope ( { method : [ 'primaryColor' , 'red' ] } )
215
215
. findOne ( )
216
216
. then ( shoe => {
217
217
expect ( shoe ) . to . have . property ( 'primaryColor' , 'red' ) ;
218
218
} )
219
219
) ;
220
220
221
221
it ( 'should find appropriate shoe due to correctly passed scope function param including associated model' , ( ) =>
222
- ( ShoeWithScopes . scope ( { method : [ 'primaryColorWithManufacturer' , 'red' ] } ) as typeof ShoeWithScopes )
222
+ ShoeWithScopes . scope ( { method : [ 'primaryColorWithManufacturer' , 'red' ] } )
223
223
. findOne ( )
224
224
. then ( shoe => {
225
225
expect ( shoe ) . to . have . property ( 'primaryColor' , 'red' ) ;
0 commit comments