Skip to content

Commit

Permalink
fix: use initial workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
jrea committed Jun 14, 2022
1 parent eda59da commit 824c039
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/nile/src/Nile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function ApiImpl(config?: ConfigurationParameters): NileApi {

const cfg = new Configuration(config);
const nile = new NileApi(cfg);
nile.workspace = cfg.workspace;
return nile;
}
export default ApiImpl;
10 changes: 10 additions & 0 deletions lib/nile/src/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ describe('index', () => {
'listUsers',
'loginUser',
'me',
'updateUser',
'validateUser',
]);
}
Expand Down Expand Up @@ -161,4 +162,13 @@ describe('index', () => {
expect(nile.workspaces.workspace).toBeTruthy();
expect(nile.organizations.workspace).toBeTruthy();
});
it('sets the initial workspace', () => {
const nile = Nile({ workspace: '123' });
expect(nile.workspace).toBe('123');
expect(nile.users.workspace).toBe('123');
expect(nile.developers.workspace).toBe('123');
expect(nile.entities.workspace).toBe('123');
expect(nile.workspaces.workspace).toBe('123');
expect(nile.organizations.workspace).toBe('123');
});
});

1 comment on commit 824c039

@vercel
Copy link

@vercel vercel bot commented on 824c039 Jun 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nile-js – ./

nile-js.vercel.app
nile-js-git-master-theniledev.vercel.app
nile-js-theniledev.vercel.app

Please sign in to comment.