Skip to content

Commit

Permalink
style: lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
vladholubiev committed Jul 5, 2021
1 parent 152c1c3 commit 1b66495
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"root": true,
"extends": ["@shelf/eslint-config/backend"],
"rules": {
"no-console": 0
"no-console": 0,
"import/order": 0
}
}
6 changes: 3 additions & 3 deletions jest-mongodb-config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
mongodbMemoryServerOptions: {
binary: {
skipMD5: true
skipMD5: true,
},
autoStart: false,
instance: {}
instance: {},
},
mongoURLEnvName: 'MONGO_URL'
mongoURLEnvName: 'MONGO_URL',
};
2 changes: 1 addition & 1 deletion jest-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ const {resolve} = require('path');
module.exports = {
globalSetup: resolve(__dirname, './setup.js'),
globalTeardown: resolve(__dirname, './teardown.js'),
testEnvironment: resolve(__dirname, './environment.js')
testEnvironment: resolve(__dirname, './environment.js'),
};
6 changes: 3 additions & 3 deletions mongo-aggregate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('insert', () => {
beforeAll(async () => {
connection = await MongoClient.connect(uri, {
useNewUrlParser: true,
useUnifiedTopology: true
useUnifiedTopology: true,
});
db = await connection.db();
});
Expand All @@ -27,7 +27,7 @@ describe('insert', () => {
{type: 'Image'},
{type: 'Document'},
{type: 'Image'},
{type: 'Document'}
{type: 'Document'},
]);

const topFiles = await files
Expand All @@ -37,7 +37,7 @@ describe('insert', () => {
expect(topFiles).toEqual([
{_id: 'Document', count: 3},
{_id: 'Image', count: 2},
{_id: 'Video', count: 1}
{_id: 'Video', count: 1},
]);
});
});
4 changes: 2 additions & 2 deletions mongo-insert.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('insert', () => {
beforeAll(async () => {
connection = await MongoClient.connect(uri, {
useNewUrlParser: true,
useUnifiedTopology: true
useUnifiedTopology: true,
});
db = await connection.db();
});
Expand Down Expand Up @@ -40,7 +40,7 @@ describe('insert', () => {
expect(insertedUsers).toEqual([
expect.objectContaining({name: 'John'}),
expect.objectContaining({name: 'Alice'}),
expect.objectContaining({name: 'Bob'})
expect.objectContaining({name: 'Bob'}),
]);
});
});
6 changes: 3 additions & 3 deletions setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = async () => {

const mongoConfig = {
mongoUri: await mongod.getUri(),
mongoDBName: options.instance.dbName
mongoDBName: options.instance.dbName,
};

// Write global config to disk because all tests run in different contexts.
Expand All @@ -38,10 +38,10 @@ function getMongodbMemoryOptions() {
} catch (e) {
return {
binary: {
skipMD5: true
skipMD5: true,
},
autoStart: false,
instance: {}
instance: {},
};
}
}
Expand Down

0 comments on commit 1b66495

Please sign in to comment.