diff --git a/tests/dotnet/NugetRegistryInfo.test.ts b/tests/dotnet/NugetRegistryInfo.test.ts index d5a7129..3cc0c48 100644 --- a/tests/dotnet/NugetRegistryInfo.test.ts +++ b/tests/dotnet/NugetRegistryInfo.test.ts @@ -6,6 +6,9 @@ import { MSBuildProject } from '@halospv3/hce.shared-config/dotnet/MSBuildProjec import { NugetRegistryInfo as NRI, NugetRegistryInfoOptions as NRIOpts, + NugetRegistryInfoOptionsBase as NRIOptsBase, + getGithubOutput, + getGithubOutputSync, } from '@halospv3/hce.shared-config/dotnet/NugetRegistryInfo' import { resolve } from 'node:path' import { isConstructor } from '@halospv3/hce.shared-config/utils/reflection' @@ -22,6 +25,7 @@ await describe('NugetRegistryInfo', async (ctx0) => { deepStrictEqual(NRI.name, ctx0.name) }) + // memory leak...but why? await describe('an instance of NugetRegistryInfo...', async () => { const predefinedToken = getEnvVarValue('NUGET_TOKEN') const { DeterministicNupkgCsproj } = await import('./MSBuildProject.projects.js') @@ -112,3 +116,80 @@ await describe('NugetRegistryInfo', async (ctx0) => { await todo('is a string') }) }) + +await describe('NRIOptsBase', async () => { + await it('has expected props', async () => { + strictEqual( + JSON.stringify(NRIOptsBase.props, undefined, 2), + `[ + { + "key": "project", + "value": "$ark.MSBuildProject" + }, + { + "key": "tokenEnvVars", + "value": { + "sequence": "string", + "proto": "Array" + } + }, + { + "key": "url", + "value": "string" + } +]`, + ) + }) + await it('has expected props (In)', async () => { + strictEqual( + JSON.stringify(NRIOptsBase.in.props, undefined, 2), + `[ + { + "key": "project", + "value": "$ark.MSBuildProject" + }, + { + "key": "tokenEnvVars", + "value": { + "sequence": "string", + "proto": "Array" + } + }, + { + "key": "url", + "value": "string" + } +]`, + ) + }) + await it('has expected props (Out)', async () => { + strictEqual( + JSON.stringify(NRIOptsBase.out.props, undefined, 2), + `[ + { + "key": "project", + "value": "$ark.MSBuildProject" + }, + { + "key": "tokenEnvVars", + "value": { + "sequence": "string", + "proto": "Array" + } + }, + { + "key": "url", + "value": "string" + } +]`, + ) + }) +}) + +await describe('getGithubOutput', async (ctx0) => { + await it('has expected name', () => strictEqual(getGithubOutput.name, ctx0.name)) +}) + +await describe('getGithubOutputSync', async (ctx0) => { + await it('has expected name', () => strictEqual(getGithubOutputSync.name, ctx0.name)) +})