Extract @ipp/core npm workspace package

This commit is contained in:
Alan Grainger
2026-10-05 15:55:18 +13:00
parent 54c0f91c4e
commit d03a77f691
65 changed files with 1056 additions and 746 deletions
+7 -5
View File
@@ -1,14 +1,16 @@
import { describe, it, expect, vi } from 'vitest'
import { AssetType, ImageSize, KeyType } from '../src/types'
import type { Asset } from '../src/types'
import { AssetType, KeyType } from '@ipp/core'
import type { Asset } from '@ipp/core'
import { ImageSize } from '../src/types'
import { getFilename } from '../src/gallery/filename'
/*
getFilename reads `ipp.downloadedFilename` via getConfigOption; mock the
config-access module so tests exercise the default (original filename) mode
getFilename reads `ipp.downloadedFilename` via getConfigOption; mock it in
@ipp/core so tests exercise the default (original filename) mode
without loading a real config file.
*/
vi.mock('../src/config/access', () => ({
vi.mock('@ipp/core', async (importOriginal) => ({
...await importOriginal<typeof import('@ipp/core')>(),
getConfigOption: (_path: string, fallback?: unknown) => fallback
}))