Skip to content

Commit

Permalink
fix: lint the test file properly
Browse files Browse the repository at this point in the history
  • Loading branch information
adriguy committed Apr 21, 2021
1 parent 83c3084 commit 8418089
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions test/databases.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1532,15 +1532,17 @@ const HasManyDissociator = require('../src/services/has-many-dissociator');

describe('request on the resources getter with a search on a bigInt primary key', () => {
describe('with a bigInt that does not matches', () => {

it('should return 0 records for the specified page', async () => {
expect.assertions(1);

const { models, sequelizeOptions } = initializeSequelize();

// HACK: sequelize-fixtures does not support BigInt in json files,
// so we need to update the id value manually
await models.bird.update({ id: BigInt('9223372036854770000') }, { where: { name: 'eagle' } });
await models.bird.update(
{ id: BigInt('9223372036854770000') }, // eslint-disable-line no-undef
{ where: { name: 'eagle' } },
);

const params = {
fields: {
Expand All @@ -1566,7 +1568,10 @@ const HasManyDissociator = require('../src/services/has-many-dissociator');

// HACK: sequelize-fixtures does not support BigInt in json files,
// so we need to update the id value manually
await models.bird.update({ id: BigInt('9223372036854770000') }, { where: { name: 'eagle' } });
await models.bird.update(
{ id: BigInt('9223372036854770000') }, // eslint-disable-line no-undef
{ where: { name: 'eagle' } },
);

const params = {
search: '9223372036854770001',
Expand All @@ -1590,7 +1595,10 @@ const HasManyDissociator = require('../src/services/has-many-dissociator');

// HACK: sequelize-fixtures does not support BigInt in json files,
// so we need to update the id value manually
await models.bird.update({ id: BigInt('9223372036854770000') }, { where: { name: 'eagle' } });
await models.bird.update(
{ id: BigInt('9223372036854770000') }, // eslint-disable-line no-undef
{ where: { name: 'eagle' } },
);

const params = {
fields: {
Expand All @@ -1616,7 +1624,10 @@ const HasManyDissociator = require('../src/services/has-many-dissociator');

// HACK: sequelize-fixtures does not support BigInt in json files,
// so we need to update the id value manually
await models.bird.update({ id: BigInt('9223372036854770000') }, { where: { name: 'eagle' } });
await models.bird.update(
{ id: BigInt('9223372036854770000') }, // eslint-disable-line no-undef
{ where: { name: 'eagle' } },
);

const params = {
search: '9223372036854770000',
Expand Down

0 comments on commit 8418089

Please sign in to comment.