Skip to content

Commit

Permalink
docs: Rename universe_domain to universe-domain
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbankhead committed May 7, 2024
1 parent 4026b18 commit c01f519
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export function project<T = any>(options?: string | Options) {
*
* @example
* ```
* const universeDomain: string = await universe('universe_domain');
* const universeDomain: string = await universe('universe-domain');
* ```
*/
export function universe<T>(options?: string | Options) {
Expand Down
8 changes: 4 additions & 4 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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),
];
Expand All @@ -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());
});
Expand Down

0 comments on commit c01f519

Please sign in to comment.