Skip to content

Commit 595e176

Browse files
authored
Update custom-transform.spec.ts
1 parent 885971d commit 595e176

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/custom-transform.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,22 +199,22 @@ describe("custom transformation decorator", () => {
199199
public address: Address;
200200

201201
@Type(() => Hobby)
202-
@Transform(value => value.filter((hobby) => hobby.type === 'sport'), { toClassOnly: true })
202+
@Transform(value => value.filter((hobby: any) => hobby.type === 'sport'), { toClassOnly: true })
203203
public hobbies: Hobby[];
204204

205205
public age: number;
206206
}
207207
model = plainToClass(Person, json);
208208
expect(model instanceof Person);
209209
expect(model.address instanceof Address);
210-
model.hobbies.forEach((hobby) => expect(hobby instanceof Hobby && hobby.type === 'sport'));
210+
model.hobbies.forEach((hobby: Hobby) => expect(hobby instanceof Hobby && hobby.type === 'sport'));
211211
}).not.toThrowError();
212212
});
213213

214214
it ('should serialize a model into json', () => {
215215
expect(() => {
216216
classToPlain(model);
217-
}).not.toThrowError();
217+
}).to.not.throw();
218218
});
219219

220220
});

0 commit comments

Comments
 (0)