chore: Upgrade Babel, Jest, Eslint (#1437)

* chore: Upgrade Prettier 1.8 -> 2.0

* chore: Upgrade Babel 6 -> 7

* chore: Upgrade eslint plugins

* chore: Add eslint import/order rules

* chore: Update flow-typed deps
This commit is contained in:
Tom Moor
2020-08-08 22:53:59 -07:00
committed by GitHub
parent e312b264a6
commit 449dc55aaa
317 changed files with 16474 additions and 12183 deletions

View File

@ -2,15 +2,15 @@
import TestServer from "fetch-test-server";
import app from "../app";
import { CollectionUser } from "../models";
import { flushdb, seed } from "../test/support";
import { buildUser, buildShare } from "../test/factories";
import { flushdb, seed } from "../test/support";
const server = new TestServer(app.callback());
beforeEach(flushdb);
afterAll(server.close);
beforeEach(() => flushdb());
afterAll(() => server.close());
describe("#shares.list", async () => {
describe("#shares.list", () => {
it("should only return shares created by user", async () => {
const { user, admin, document } = await seed();
await buildShare({
@ -117,7 +117,7 @@ describe("#shares.list", async () => {
});
});
describe("#shares.create", async () => {
describe("#shares.create", () => {
it("should allow creating a share record for document", async () => {
const { user, document } = await seed();
const res = await server.post("/api/shares.create", {
@ -216,7 +216,7 @@ describe("#shares.create", async () => {
});
});
describe("#shares.info", async () => {
describe("#shares.info", () => {
it("should allow reading share by id", async () => {
const { user, document } = await seed();
const share = await buildShare({
@ -299,7 +299,7 @@ describe("#shares.info", async () => {
});
});
describe("#shares.update", async () => {
describe("#shares.update", () => {
it("should allow author to update a share", async () => {
const { user, document } = await seed();
const share = await buildShare({
@ -367,7 +367,7 @@ describe("#shares.update", async () => {
});
});
describe("#shares.revoke", async () => {
describe("#shares.revoke", () => {
it("should allow author to revoke a share", async () => {
const { user, document } = await seed();
const share = await buildShare({