chore: Move to prettier standard double quotes (#1309)
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
/* eslint-disable flowtype/require-valid-file-annotation */
|
||||
import { flushdb } from '../test/support';
|
||||
import BacklinksService from './backlinks';
|
||||
import { buildDocument } from '../test/factories';
|
||||
import Backlink from '../models/Backlink';
|
||||
import { flushdb } from "../test/support";
|
||||
import BacklinksService from "./backlinks";
|
||||
import { buildDocument } from "../test/factories";
|
||||
import Backlink from "../models/Backlink";
|
||||
|
||||
const Backlinks = new BacklinksService();
|
||||
|
||||
beforeEach(flushdb);
|
||||
beforeEach(jest.resetAllMocks);
|
||||
|
||||
describe('documents.update', () => {
|
||||
test('should not fail on a document with no previous revisions', async () => {
|
||||
describe("documents.update", () => {
|
||||
test("should not fail on a document with no previous revisions", async () => {
|
||||
const otherDocument = await buildDocument();
|
||||
const document = await buildDocument({
|
||||
text: `[this is a link](${otherDocument.url})`,
|
||||
});
|
||||
|
||||
await Backlinks.on({
|
||||
name: 'documents.update',
|
||||
name: "documents.update",
|
||||
documentId: document.id,
|
||||
collectionId: document.collectionId,
|
||||
teamId: document.teamId,
|
||||
@@ -32,7 +32,7 @@ describe('documents.update', () => {
|
||||
expect(backlinks.length).toBe(1);
|
||||
});
|
||||
|
||||
test('should create new backlink records', async () => {
|
||||
test("should create new backlink records", async () => {
|
||||
const otherDocument = await buildDocument();
|
||||
const document = await buildDocument();
|
||||
|
||||
@@ -40,7 +40,7 @@ describe('documents.update', () => {
|
||||
await document.save();
|
||||
|
||||
await Backlinks.on({
|
||||
name: 'documents.update',
|
||||
name: "documents.update",
|
||||
documentId: document.id,
|
||||
collectionId: document.collectionId,
|
||||
teamId: document.teamId,
|
||||
@@ -55,14 +55,14 @@ describe('documents.update', () => {
|
||||
expect(backlinks.length).toBe(1);
|
||||
});
|
||||
|
||||
test('should destroy removed backlink records', async () => {
|
||||
test("should destroy removed backlink records", async () => {
|
||||
const otherDocument = await buildDocument();
|
||||
const document = await buildDocument({
|
||||
text: `[this is a link](${otherDocument.url})`,
|
||||
});
|
||||
|
||||
await Backlinks.on({
|
||||
name: 'documents.publish',
|
||||
name: "documents.publish",
|
||||
documentId: document.id,
|
||||
collectionId: document.collectionId,
|
||||
teamId: document.teamId,
|
||||
@@ -70,11 +70,11 @@ describe('documents.update', () => {
|
||||
data: { autosave: false },
|
||||
});
|
||||
|
||||
document.text = 'Link is gone';
|
||||
document.text = "Link is gone";
|
||||
await document.save();
|
||||
|
||||
await Backlinks.on({
|
||||
name: 'documents.update',
|
||||
name: "documents.update",
|
||||
documentId: document.id,
|
||||
collectionId: document.collectionId,
|
||||
teamId: document.teamId,
|
||||
@@ -89,8 +89,8 @@ describe('documents.update', () => {
|
||||
expect(backlinks.length).toBe(0);
|
||||
});
|
||||
|
||||
test('should update titles in backlinked documents', async () => {
|
||||
const newTitle = 'test';
|
||||
test("should update titles in backlinked documents", async () => {
|
||||
const newTitle = "test";
|
||||
const document = await buildDocument();
|
||||
const otherDocument = await buildDocument();
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('documents.update', () => {
|
||||
|
||||
// ensure the backlinks are created
|
||||
await Backlinks.on({
|
||||
name: 'documents.update',
|
||||
name: "documents.update",
|
||||
documentId: document.id,
|
||||
collectionId: document.collectionId,
|
||||
teamId: document.teamId,
|
||||
@@ -114,7 +114,7 @@ describe('documents.update', () => {
|
||||
|
||||
// does the text get updated with the new title
|
||||
await Backlinks.on({
|
||||
name: 'documents.update',
|
||||
name: "documents.update",
|
||||
documentId: otherDocument.id,
|
||||
collectionId: otherDocument.collectionId,
|
||||
teamId: otherDocument.teamId,
|
||||
|
||||
Reference in New Issue
Block a user