Skip to content

Commit b981441

Browse files
committed
test: workaround a sequelize-fixtures bug
1 parent f8fabe7 commit b981441

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/databases.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,13 @@ const HasManyDissociator = require('../src/services/has-many-dissociator');
10281028
it('should handle numbers over MAX_SAFE_INTEGER', async () => {
10291029
expect.assertions(2);
10301030
const { models, sequelizeOptions } = initializeSequelize();
1031+
1032+
// HACK: sequelize-fixtures does not support BigInt in json files,
1033+
// so we need to update the clicks value manually
1034+
const counter = await models.counter.findByPk(10);
1035+
counter.clicks = BigInt('9013084467599484828'); // eslint-disable-line no-undef
1036+
await counter.save();
1037+
10311038
const params = {
10321039
fields: {
10331040
counter: 'id,clicks',

0 commit comments

Comments
 (0)