Skip to content

Commit b8535dc

Browse files
committed
all tests passing
all tests are passing now. The problem was that when it wants to create a new record and the record already existed it raised an error. This is a problem for tests ran on a fresh sequelize instance.
1 parent 3aa165c commit b8535dc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/helpers/insertDummyData.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ async function insertDummyData(sequelize) {
1111
{id: '161640664076316994', username: 'Otto'},
1212
{id: '997027454665226734', username: 'BallFondler'},
1313
{id: '667792375797365060', username: 'Among Us Guy'}
14-
]);
14+
], {ignoreDuplicates: true});
1515

1616
await sequelize.models.Guild.bulkCreate([
1717
{id: '827597916039016962'}
18-
]);
18+
], {ignoreDuplicates: true});
1919

2020
await sequelize.models.Score.bulkCreate([
2121
{GuildId: '827597916039016962', UserId: '455840886956257287', score: 985},
2222
{GuildId: '827597916039016962', UserId: '161640664076316994', score: 0},
2323
{GuildId: '827597916039016962', UserId: '997027454665226734', score: 12},
2424
{GuildId: '827597916039016962', UserId: '667792375797365060', score: 82},
25-
]);
25+
], {ignoreDuplicates: true});
2626
} catch(err) {
2727
console.log('could not insert values into database', err);
2828
}

0 commit comments

Comments
 (0)