From c01f5195277b6498e283d235ed7be89246e10ac0 Mon Sep 17 00:00:00 2001 From: Daniel Bankhead Date: Tue, 7 May 2024 11:56:21 -0700 Subject: [PATCH] docs: Rename `universe_domain` to `universe-domain` --- src/index.ts | 2 +- test/index.test.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index ee6eba7..82e13a0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -270,7 +270,7 @@ export function project(options?: string | Options) { * * @example * ``` - * const universeDomain: string = await universe('universe_domain'); + * const universeDomain: string = await universe('universe-domain'); * ``` */ export function universe(options?: string | Options) { diff --git a/test/index.test.ts b/test/index.test.ts index ffdaad9..d23eeb5 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -161,7 +161,7 @@ describe('unit test', () => { }); it('should query the `universe` type', async () => { - const PROPERTY = 'universe_domain'; + const PROPERTY = 'universe-domain'; const VALUE = 'my-domain.com'; const scope = nock(HOST) @@ -284,7 +284,7 @@ describe('unit test', () => { const scopes = [ nock(HOST) - .get(`${PATH}/universe/universe_domain`) + .get(`${PATH}/universe/universe-domain`) .reply(200, UNIVERSE_DOMAIN, HEADERS), nock(HOST).get(`${PATH}/instance`).reply(200, INSTANCE_VALUE, HEADERS), ]; @@ -294,12 +294,12 @@ describe('unit test', () => { metadataKey: 'instance', }, { - metadataKey: 'universe/universe_domain', + metadataKey: 'universe/universe-domain', }, ] as const); assert.deepEqual(data.instance, INSTANCE_VALUE); - assert.deepEqual(data['universe/universe_domain'], UNIVERSE_DOMAIN); + assert.deepEqual(data['universe/universe-domain'], UNIVERSE_DOMAIN); scopes.map(scope => scope.done()); });