Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add utility for finding duplicate Notion pages #433

Merged
merged 8 commits into from
Jan 15, 2024
Prev Previous commit
Next Next commit
refactor: Add index file for test utils
  • Loading branch information
dvanoni committed Jan 14, 2024
commit 221d7959f22ba5b1fe1595c8df5cc81bd502d9d2
2 changes: 1 addition & 1 deletion src/content/data/__tests__/item-data.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createZoteroItemMock } from '../../../../test/utils/zotero-mock';
import { createZoteroItemMock } from '../../../../test/utils';
import { getSyncedNotesFromAttachment } from '../item-data';

describe('getSyncedNotesFromAttachment', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/content/services/__tests__/sync-manager.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { mock } from 'jest-mock-extended';

import { createWindowMock } from '../../../../test/utils/window-mock';
import {
createWindowMock,
createZoteroCollectionMock,
createZoteroItemMock,
mockZoteroPrefs,
} from '../../../../test/utils/zotero-mock';
} from '../../../../test/utils';
import { getSyncedNotes } from '../../data/item-data';
import { saveSyncConfigs } from '../../prefs/collection-sync-config';
import { NoteroPref, setNoteroPref } from '../../prefs/notero-pref';
Expand Down
5 changes: 1 addition & 4 deletions src/content/sync/__tests__/property-builder.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { any, mock } from 'jest-mock-extended';

import {
createZoteroCollectionMock,
zoteroMock,
} from '../../../../test/utils/zotero-mock';
import { createZoteroCollectionMock, zoteroMock } from '../../../../test/utils';
import { PageTitleFormat } from '../../prefs/notero-pref';
import { getItemURL, keyValue } from '../../utils';
import type {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createZoteroCollectionMock } from '../../../../test/utils/zotero-mock';
import { createZoteroCollectionMock } from '../../../../test/utils';
import { buildCollectionFullName } from '../build-collection-full-name';

const parent = createZoteroCollectionMock({ name: 'Parent Name' });
Expand Down
5 changes: 1 addition & 4 deletions src/content/utils/__tests__/get-item-url.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
createZoteroItemMock,
zoteroMock,
} from '../../../../test/utils/zotero-mock';
import { createZoteroItemMock, zoteroMock } from '../../../../test/utils';
import { getItemURL } from '../get-item-url';

const itemMock = createZoteroItemMock();
Expand Down
7 changes: 7 additions & 0 deletions test/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export { createWindowMock } from './window-mock';
export {
createZoteroCollectionMock,
createZoteroItemMock,
mockZoteroPrefs,
zoteroMock,
} from './zotero-mock';