Skip to content

Commit 870e317

Browse files
committed
test(orm): format the date to ISO
1 parent 78bcfb1 commit 870e317

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/orm/model_has_many.spec.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3729,27 +3729,27 @@ if (process.env.DB !== 'mysql_legacy') {
37293729
{
37303730
user_id: user0.id,
37313731
title: 'Adonis 101',
3732-
created_at: now,
3732+
created_at: now.toISO(),
37333733
},
37343734
{
37353735
user_id: user0.id,
37363736
title: 'Adonis 102',
3737-
created_at: now.plus({ seconds: 1 }),
3737+
created_at: now.plus({ seconds: 1 }).toISO(),
37383738
},
37393739
{
37403740
user_id: user0.id,
37413741
title: 'Adonis 103',
3742-
created_at: now.plus({ seconds: 2 }),
3742+
created_at: now.plus({ seconds: 2 }).toISO(),
37433743
},
37443744
{
37453745
user_id: user0.id,
37463746
title: 'Adonis 104',
3747-
created_at: now.plus({ seconds: 3 }),
3747+
created_at: now.plus({ seconds: 3 }).toISO(),
37483748
},
37493749
{
37503750
user_id: user0.id,
37513751
title: 'Adonis 105',
3752-
created_at: now.plus({ seconds: 4 }),
3752+
created_at: now.plus({ seconds: 4 }).toISO(),
37533753
},
37543754
])
37553755

@@ -3763,34 +3763,34 @@ if (process.env.DB !== 'mysql_legacy') {
37633763
{
37643764
user_id: user1.id,
37653765
title: 'Lucid 101',
3766-
created_at: now,
3766+
created_at: now.toISO(),
37673767
},
37683768
{
37693769
user_id: user1.id,
37703770
title: 'Lucid 102',
3771-
created_at: now.plus({ seconds: 1 }),
3771+
created_at: now.plus({ seconds: 1 }).toISO(),
37723772
},
37733773
{
37743774
user_id: user1.id,
37753775
title: 'Lucid 103',
3776-
created_at: now.plus({ seconds: 2 }),
3776+
created_at: now.plus({ seconds: 2 }).toISO(),
37773777
},
37783778
{
37793779
user_id: user1.id,
37803780
title: 'Lucid 104',
3781-
created_at: now.plus({ seconds: 3 }),
3781+
created_at: now.plus({ seconds: 3 }).toISO(),
37823782
},
37833783
{
37843784
user_id: user1.id,
37853785
title: 'Lucid 105',
3786-
created_at: now.plus({ seconds: 4 }),
3786+
created_at: now.plus({ seconds: 4 }).toISO(),
37873787
},
37883788
])
37893789

37903790
User.boot()
37913791

37923792
const users = await User.query().preload('posts', (query) => {
3793-
query.groupLimit(2).groupOrderBy('created_at', 'desc')
3793+
query.groupLimit(2).groupOrderBy('created_at', 'asc')
37943794
})
37953795
assert.lengthOf(users, 2)
37963796

0 commit comments

Comments
 (0)