/// import path from 'node:path' import { assertStore } from '@pnpm/assert-store' import { STORE_VERSION } from '@pnpm/constants' test('assertStore() store assertions', async () => { const storePath = path.join(import.meta.dirname, `fixture/store/${STORE_VERSION}/`) const encodedRegistryName = 'registry.npmjs.org' const store = assertStore(storePath, encodedRegistryName) store.storeHas('is-positive', '3.1.0') store.storeHasNot('ansi-regex', '2.0.0') store.storeHasNot('is-positive', '2.0.0') }) test('assertStore() resolve', async () => { const storePath = path.join(import.meta.dirname, `fixture/store/${STORE_VERSION}/`) const encodedRegistryName = 'registry.npmjs.org' const store = assertStore(storePath, encodedRegistryName) expect(typeof store.resolve('is-positive', '3.1.0')).toBe('string') })