-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a4e21c
commit 96cd82e
Showing
4 changed files
with
157 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
packages/elements/src/components/TryIt/__tests__/parameters.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { httpOperation } from '../../../__fixtures__/operations/put-todos'; | ||
import { initialParameterValues } from '../OperationParameters'; | ||
|
||
describe('Parameters', () => { | ||
it('should fill initial parameters', () => { | ||
const operationParameters = { | ||
path: httpOperation.request?.path, | ||
query: httpOperation.request?.query, | ||
headers: httpOperation.request?.headers, | ||
}; | ||
|
||
const parameters = initialParameterValues(operationParameters); | ||
|
||
expect(parameters).toMatchObject({ | ||
limit: '0', | ||
type: 'something', | ||
value: '0', | ||
'account-id': 'example id', | ||
'message-id': 'example value', | ||
}); | ||
}); | ||
}); |