replaced eslint:recommended with prettier

This commit is contained in:
Wyatt Johnson
2018-01-11 20:00:34 -07:00
parent d56c19016a
commit 0abc2ca243
649 changed files with 16235 additions and 13008 deletions
+10 -12
View File
@@ -1,14 +1,14 @@
const {graphql} = require('graphql');
const { graphql } = require('graphql');
const schema = require('../../../../graph/schema');
const Context = require('../../../../graph/context');
const SettingsService = require('../../../../services/settings');
const UserModel = require('../../../../models/user');
const {expect} = require('chai');
const { expect } = require('chai');
const defaultSettings = {
organizationName: 'The Coral Project'
organizationName: 'The Coral Project',
};
describe('graph.queries.settings', () => {
@@ -47,7 +47,6 @@ describe('graph.queries.settings', () => {
`;
describe('context with different user roles', () => {
const BLACKLISTED_PROPERTIES = [
'premodLinksEnable',
'autoCloseStream',
@@ -56,13 +55,13 @@ describe('graph.queries.settings', () => {
];
[
{bl: true, role: 'COMMENTER'},
{bl: false, role: 'ADMIN'},
{bl: false, role: 'MODERATOR'},
].forEach(({bl, role}) => {
{ bl: true, role: 'COMMENTER' },
{ bl: false, role: 'ADMIN' },
{ bl: false, role: 'MODERATOR' },
].forEach(({ bl, role }) => {
it(`role = ${role}`, async () => {
let user = new UserModel({role});
const ctx = new Context({user});
let user = new UserModel({ role });
const ctx = new Context({ user });
const res = await graphql(schema, QUERY, {}, ctx);
if (res.errors) {
@@ -71,7 +70,7 @@ describe('graph.queries.settings', () => {
expect(res.errors).to.be.empty;
expect(res.data.settings).to.be.object;
Object.keys(res.data.settings).forEach((key) => {
Object.keys(res.data.settings).forEach(key => {
if (bl && BLACKLISTED_PROPERTIES.includes(key)) {
expect(res.data.settings).to.have.property(key, null);
return;
@@ -87,5 +86,4 @@ describe('graph.queries.settings', () => {
});
});
});
});