chore: Move to prettier standard double quotes (#1309)

This commit is contained in:
Tom Moor
2020-06-20 13:59:15 -07:00
committed by GitHub
parent 2a3b9e2104
commit f43deb7940
444 changed files with 5988 additions and 5977 deletions

View File

@ -1,21 +1,21 @@
/* eslint-disable flowtype/require-valid-file-annotation */
import TestServer from 'fetch-test-server';
import app from '../app';
import { flushdb, seed } from '../test/support';
import { buildEvent } from '../test/factories';
import TestServer from "fetch-test-server";
import app from "../app";
import { flushdb, seed } from "../test/support";
import { buildEvent } from "../test/factories";
const server = new TestServer(app.callback());
beforeEach(flushdb);
afterAll(server.close);
describe('#events.list', async () => {
it('should only return activity events', async () => {
describe("#events.list", async () => {
it("should only return activity events", async () => {
const { user, admin, document, collection } = await seed();
// private event
await buildEvent({
name: 'users.promote',
name: "users.promote",
teamId: user.teamId,
actorId: admin.id,
userId: user.id,
@ -23,13 +23,13 @@ describe('#events.list', async () => {
// event viewable in activity stream
const event = await buildEvent({
name: 'documents.publish',
name: "documents.publish",
collectionId: collection.id,
documentId: document.id,
teamId: user.teamId,
actorId: admin.id,
});
const res = await server.post('/api/events.list', {
const res = await server.post("/api/events.list", {
body: { token: user.getJwtToken() },
});
const body = await res.json();
@ -39,12 +39,12 @@ describe('#events.list', async () => {
expect(body.data[0].id).toEqual(event.id);
});
it('should return events with deleted actors', async () => {
it("should return events with deleted actors", async () => {
const { user, admin, document, collection } = await seed();
// event viewable in activity stream
const event = await buildEvent({
name: 'documents.publish',
name: "documents.publish",
collectionId: collection.id,
documentId: document.id,
teamId: user.teamId,
@ -53,7 +53,7 @@ describe('#events.list', async () => {
await user.destroy();
const res = await server.post('/api/events.list', {
const res = await server.post("/api/events.list", {
body: { token: admin.getJwtToken() },
});
@ -64,8 +64,8 @@ describe('#events.list', async () => {
expect(body.data[0].id).toEqual(event.id);
});
it('should require authentication', async () => {
const res = await server.post('/api/events.list');
it("should require authentication", async () => {
const res = await server.post("/api/events.list");
const body = await res.json();
expect(res.status).toEqual(401);