Skip to content

Commit 8062483

Browse files
committed
Fix tests due to IFindOptions change
1 parent ddc0608 commit 8062483

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/specs/instance.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,7 +2050,7 @@ describe('instance', () => {
20502050

20512051
return UserDestroy.sync().then(() => {
20522052
return UserDestroy.create({newId: '123ABC', email: 'hello'}).then(() => {
2053-
return UserDestroy.findOne({where: {email: 'hello'}}).then((user) => {
2053+
return UserDestroy.findOne<UserDestroy>({where: {email: 'hello'}}).then((user) => {
20542054
return user.destroy();
20552055
});
20562056
});
@@ -2165,7 +2165,7 @@ describe('instance', () => {
21652165
it('can compare records with Date field', () =>
21662166

21672167
User.create({username: 'fnord'}).then((user1) =>
2168-
User.findOne({where: {username: 'fnord'}}).then((user2) => {
2168+
User.findOne<User>({where: {username: 'fnord'}}).then((user2) => {
21692169
expect(user1.equals(user2)).to.be.true;
21702170
})
21712171
)
@@ -2445,7 +2445,7 @@ describe('instance', () => {
24452445
return ParanoidUser2.sync({force: true}).then(() => {
24462446
return ParanoidUser2.bulkCreate(data);
24472447
}).then(() => {
2448-
return ParanoidUser2.findOne({where: {secretValue: '42'}});
2448+
return ParanoidUser2.findOne<ParanoidUser2>({where: {secretValue: '42'}});
24492449
}).then((user) => {
24502450
return user.destroy().then(() => {
24512451
return user.restore();

test/specs/model.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ describe('model', () => {
207207
{aNumber: 10},
208208
{aNumber: 12}
209209
]).then(() => {
210-
return User.findAll({where: {aNumber: {gte: 10}}}).then((users) => {
210+
return User.findAll<User>({where: {aNumber: {$gte: 10}}}).then((users) => {
211211
expect(moment(user.createdAt).format('YYYY-MM-DD')).to.equal('2012-01-01');
212212
expect(moment(user.updatedAt).format('YYYY-MM-DD')).to.equal('2012-01-02');
213213
users.forEach((u) => {

0 commit comments

Comments
 (0)