Reorganised unit tests locations - moved all of them to a dedicated folder

This commit is contained in:
SebastianMC 2024-02-19 08:59:17 +01:00
parent ba54e63a48
commit 2c3de3d609
9 changed files with 23 additions and 23 deletions

View File

@ -2,8 +2,8 @@ import {
_unitTests, _unitTests,
BookmarkedParentFolder, BookmarkedParentFolder,
OrderedBookmarks OrderedBookmarks
} from "./BookmarksCorePluginSignature"; } from "../../utils/BookmarksCorePluginSignature";
import {extractParentFolderPath} from "./utils"; import {extractParentFolderPath} from "../../utils/utils";
type Bookmarks_PluginInstance = any type Bookmarks_PluginInstance = any

View File

@ -4,9 +4,9 @@ import {
OS_byCreatedTime, OS_byCreatedTime,
OS_byModifiedTime, OS_byModifiedTime,
OS_byModifiedTimeReverse, SortingLevelId OS_byModifiedTimeReverse, SortingLevelId
} from './custom-sort'; } from '../../custom-sort/custom-sort';
import * as CustomSortModule from './custom-sort'; import * as CustomSortModule from '../../custom-sort/custom-sort';
import {CustomSortGroupType, CustomSortOrder, CustomSortSpec} from './custom-sort-types'; import {CustomSortGroupType, CustomSortOrder, CustomSortSpec} from '../../custom-sort/custom-sort-types';
const MOCK_TIMESTAMP: number = 1656417542418 const MOCK_TIMESTAMP: number = 1656417542418

View File

@ -2,14 +2,14 @@ import {
CustomSortGroupType, CustomSortGroupType,
CustomSortOrder, CustomSortOrder,
CustomSortSpec CustomSortSpec
} from "./custom-sort-types"; } from "../../custom-sort/custom-sort-types";
import { import {
collectSortingAndGroupingTypes, collectSortingAndGroupingTypes,
hasOnlyByBookmarkOrStandardObsidian, hasOnlyByBookmarkOrStandardObsidian,
HasSortingOrGrouping, HasSortingOrGrouping,
ImplicitSortspecForBookmarksIntegration ImplicitSortspecForBookmarksIntegration
} from "./custom-sort-utils"; } from "../../custom-sort/custom-sort-utils";
import {SortingSpecProcessor, SortSpecsCollection} from "./sorting-spec-processor"; import {SortingSpecProcessor, SortSpecsCollection} from "../../custom-sort/sorting-spec-processor";
type NM = number type NM = number

View File

@ -21,28 +21,28 @@ import {
sorterByFolderMDate, sorterByFolderMDate,
sorterByMetadataField, sorterByMetadataField,
SorterFn SorterFn
} from './custom-sort'; } from '../../custom-sort/custom-sort';
import { import {
_unitTests _unitTests
} from './custom-sort' } from '../../custom-sort/custom-sort'
import { import {
CustomSortGroupType, CustomSortGroupType,
CustomSortOrder, CustomSortOrder,
CustomSortSpec, CustomSortSpec,
RegExpSpec RegExpSpec
} from './custom-sort-types'; } from '../../custom-sort/custom-sort-types';
import { import {
CompoundDashNumberNormalizerFn, CompoundDashNumberNormalizerFn,
CompoundDotRomanNumberNormalizerFn CompoundDotRomanNumberNormalizerFn
} from "./sorting-spec-processor"; } from "../../custom-sort/sorting-spec-processor";
import { import {
findStarredFile_pathParam, findStarredFile_pathParam,
Starred_PluginInstance Starred_PluginInstance
} from "../utils/StarredPluginSignature"; } from "../../utils/StarredPluginSignature";
import { import {
ObsidianIconFolder_PluginInstance, ObsidianIconFolder_PluginInstance,
ObsidianIconFolderPlugin_Data ObsidianIconFolderPlugin_Data
} from "../utils/ObsidianIconFolderPluginSignature"; } from "../../utils/ObsidianIconFolderPluginSignature";
const mockTFile = (basename: string, ext: string, size?: number, ctime?: number, mtime?: number): TFile => { const mockTFile = (basename: string, ext: string, size?: number, ctime?: number, mtime?: number): TFile => {
return { return {

View File

@ -1,6 +1,6 @@
import { import {
FolderWildcardMatching FolderWildcardMatching
} from './folder-matching-rules' } from '../../custom-sort/folder-matching-rules'
type SortingSpec = string type SortingSpec = string

View File

@ -1,12 +1,12 @@
import { import {
expandMacros, expandMacros,
expandMacrosInString expandMacrosInString
} from "./macros"; } from "../../custom-sort/macros";
import * as MacrosModule from './macros' import * as MacrosModule from '../../custom-sort/macros'
import { import {
CustomSortGroup, CustomSortGroup,
CustomSortSpec CustomSortSpec
} from "./custom-sort-types"; } from "../../custom-sort/custom-sort-types";
describe('expandMacrosInString', () => { describe('expandMacrosInString', () => {
it.each([ it.each([

View File

@ -11,7 +11,7 @@ import {
CompoundRomanNumberDashRegexStr, CompoundRomanNumberDashRegexStr,
WordInASCIIRegexStr, WordInASCIIRegexStr,
WordInAnyLanguageRegexStr WordInAnyLanguageRegexStr
} from "./matchers"; } from "../../custom-sort/matchers";
describe('Plain numbers regexp', () => { describe('Plain numbers regexp', () => {
let regexp: RegExp; let regexp: RegExp;

View File

@ -13,9 +13,9 @@ import {
RegexpUsedAs, RegexpUsedAs,
RomanNumberNormalizerFn, RomanNumberNormalizerFn,
SortingSpecProcessor SortingSpecProcessor
} from "./sorting-spec-processor" } from "../../custom-sort/sorting-spec-processor"
import {CustomSortGroupType, CustomSortOrder, CustomSortSpec, IdentityNormalizerFn} from "./custom-sort-types"; import {CustomSortGroupType, CustomSortOrder, CustomSortSpec, IdentityNormalizerFn} from "../../custom-sort/custom-sort-types";
import {FolderMatchingRegexp, FolderMatchingTreeNode} from "./folder-matching-rules"; import {FolderMatchingRegexp, FolderMatchingTreeNode} from "../../custom-sort/folder-matching-rules";
const txtInputExampleA: string = ` const txtInputExampleA: string = `
order-asc: a-z order-asc: a-z

View File

@ -1,7 +1,7 @@
import { import {
lastPathComponent, lastPathComponent,
extractParentFolderPath extractParentFolderPath
} from "./utils"; } from "../../utils/utils";
describe('lastPathComponent and extractParentFolderPath', () => { describe('lastPathComponent and extractParentFolderPath', () => {
it.each([ it.each([