Reorganised unit tests locations - moved all of them to a dedicated folder
This commit is contained in:
parent
ba54e63a48
commit
2c3de3d609
|
@ -2,8 +2,8 @@ import {
|
|||
_unitTests,
|
||||
BookmarkedParentFolder,
|
||||
OrderedBookmarks
|
||||
} from "./BookmarksCorePluginSignature";
|
||||
import {extractParentFolderPath} from "./utils";
|
||||
} from "../../utils/BookmarksCorePluginSignature";
|
||||
import {extractParentFolderPath} from "../../utils/utils";
|
||||
|
||||
type Bookmarks_PluginInstance = any
|
||||
|
|
@ -4,9 +4,9 @@ import {
|
|||
OS_byCreatedTime,
|
||||
OS_byModifiedTime,
|
||||
OS_byModifiedTimeReverse, SortingLevelId
|
||||
} from './custom-sort';
|
||||
import * as CustomSortModule from './custom-sort';
|
||||
import {CustomSortGroupType, CustomSortOrder, CustomSortSpec} from './custom-sort-types';
|
||||
} from '../../custom-sort/custom-sort';
|
||||
import * as CustomSortModule from '../../custom-sort/custom-sort';
|
||||
import {CustomSortGroupType, CustomSortOrder, CustomSortSpec} from '../../custom-sort/custom-sort-types';
|
||||
|
||||
const MOCK_TIMESTAMP: number = 1656417542418
|
||||
|
|
@ -2,14 +2,14 @@ import {
|
|||
CustomSortGroupType,
|
||||
CustomSortOrder,
|
||||
CustomSortSpec
|
||||
} from "./custom-sort-types";
|
||||
} from "../../custom-sort/custom-sort-types";
|
||||
import {
|
||||
collectSortingAndGroupingTypes,
|
||||
hasOnlyByBookmarkOrStandardObsidian,
|
||||
HasSortingOrGrouping,
|
||||
ImplicitSortspecForBookmarksIntegration
|
||||
} from "./custom-sort-utils";
|
||||
import {SortingSpecProcessor, SortSpecsCollection} from "./sorting-spec-processor";
|
||||
} from "../../custom-sort/custom-sort-utils";
|
||||
import {SortingSpecProcessor, SortSpecsCollection} from "../../custom-sort/sorting-spec-processor";
|
||||
|
||||
type NM = number
|
||||
|
|
@ -21,28 +21,28 @@ import {
|
|||
sorterByFolderMDate,
|
||||
sorterByMetadataField,
|
||||
SorterFn
|
||||
} from './custom-sort';
|
||||
} from '../../custom-sort/custom-sort';
|
||||
import {
|
||||
_unitTests
|
||||
} from './custom-sort'
|
||||
} from '../../custom-sort/custom-sort'
|
||||
import {
|
||||
CustomSortGroupType,
|
||||
CustomSortOrder,
|
||||
CustomSortSpec,
|
||||
RegExpSpec
|
||||
} from './custom-sort-types';
|
||||
} from '../../custom-sort/custom-sort-types';
|
||||
import {
|
||||
CompoundDashNumberNormalizerFn,
|
||||
CompoundDotRomanNumberNormalizerFn
|
||||
} from "./sorting-spec-processor";
|
||||
} from "../../custom-sort/sorting-spec-processor";
|
||||
import {
|
||||
findStarredFile_pathParam,
|
||||
Starred_PluginInstance
|
||||
} from "../utils/StarredPluginSignature";
|
||||
} from "../../utils/StarredPluginSignature";
|
||||
import {
|
||||
ObsidianIconFolder_PluginInstance,
|
||||
ObsidianIconFolderPlugin_Data
|
||||
} from "../utils/ObsidianIconFolderPluginSignature";
|
||||
} from "../../utils/ObsidianIconFolderPluginSignature";
|
||||
|
||||
const mockTFile = (basename: string, ext: string, size?: number, ctime?: number, mtime?: number): TFile => {
|
||||
return {
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
FolderWildcardMatching
|
||||
} from './folder-matching-rules'
|
||||
} from '../../custom-sort/folder-matching-rules'
|
||||
|
||||
type SortingSpec = string
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
import {
|
||||
expandMacros,
|
||||
expandMacrosInString
|
||||
} from "./macros";
|
||||
import * as MacrosModule from './macros'
|
||||
} from "../../custom-sort/macros";
|
||||
import * as MacrosModule from '../../custom-sort/macros'
|
||||
import {
|
||||
CustomSortGroup,
|
||||
CustomSortSpec
|
||||
} from "./custom-sort-types";
|
||||
} from "../../custom-sort/custom-sort-types";
|
||||
|
||||
describe('expandMacrosInString', () => {
|
||||
it.each([
|
|
@ -11,7 +11,7 @@ import {
|
|||
CompoundRomanNumberDashRegexStr,
|
||||
WordInASCIIRegexStr,
|
||||
WordInAnyLanguageRegexStr
|
||||
} from "./matchers";
|
||||
} from "../../custom-sort/matchers";
|
||||
|
||||
describe('Plain numbers regexp', () => {
|
||||
let regexp: RegExp;
|
|
@ -13,9 +13,9 @@ import {
|
|||
RegexpUsedAs,
|
||||
RomanNumberNormalizerFn,
|
||||
SortingSpecProcessor
|
||||
} from "./sorting-spec-processor"
|
||||
import {CustomSortGroupType, CustomSortOrder, CustomSortSpec, IdentityNormalizerFn} from "./custom-sort-types";
|
||||
import {FolderMatchingRegexp, FolderMatchingTreeNode} from "./folder-matching-rules";
|
||||
} from "../../custom-sort/sorting-spec-processor"
|
||||
import {CustomSortGroupType, CustomSortOrder, CustomSortSpec, IdentityNormalizerFn} from "../../custom-sort/custom-sort-types";
|
||||
import {FolderMatchingRegexp, FolderMatchingTreeNode} from "../../custom-sort/folder-matching-rules";
|
||||
|
||||
const txtInputExampleA: string = `
|
||||
order-asc: a-z
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
lastPathComponent,
|
||||
extractParentFolderPath
|
||||
} from "./utils";
|
||||
} from "../../utils/utils";
|
||||
|
||||
describe('lastPathComponent and extractParentFolderPath', () => {
|
||||
it.each([
|
Loading…
Reference in New Issue