Skip to content

Commit fbcf3c2

Browse files
pru55e11Patrick Russellshazron
authored
fix: APAC region documentation and test expectations (#240)
* fix: make the error message match exactly, the previous way was a substring match --------- Co-authored-by: Patrick Russell <[email protected]> Co-authored-by: Shazron Abdullah <[email protected]>
1 parent 56ec324 commit fbcf3c2

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

doc/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ OpenWhisk credentials can also be read from environment variables `__OW_NAMESPAC
196196
| --- | --- | --- |
197197
| [config] | <code>object</code> | used to init the sdk |
198198
| [config.ow] | [<code>OpenWhiskCredentials</code>](#OpenWhiskCredentials) | [OpenWhiskCredentials](#OpenWhiskCredentials). Set those if you want to use ootb credentials to access the state management service. OpenWhisk namespace and auth can also be passed through environment variables: `__OW_NAMESPACE` and `__OW_API_KEY` |
199-
| [config.region] | <code>string</code> | optional region to use, accepted values: `amer` (default), `emea` |
199+
| [config.region] | <code>string</code> | optional region to use, accepted values: `amer` (default), `emea`, `apac` |
200200

201201
<a name="AdobeStateCredentials"></a>
202202

lib/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const { AdobeState } = require('./AdobeState')
4242
* to use ootb credentials to access the state management service. OpenWhisk
4343
* namespace and auth can also be passed through environment variables:
4444
* `__OW_NAMESPACE` and `__OW_API_KEY`
45-
* @param {string} [config.region] optional region to use, accepted values: `amer` (default), `emea`
45+
* @param {string} [config.region] optional region to use, accepted values: `amer` (default), `emea`, `apac`
4646
* @returns {Promise<AdobeState>} An AdobeState instance
4747
*/
4848
async function init (config = {}) {

test/AdobeState.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ describe('private methods', () => {
705705
mockCLIEnv.mockReturnValue(env)
706706

707707
await expect(AdobeState.init({ ...fakeCredentials, region })).rejects
708-
.toThrow('[AdobeStateLib:ERROR_BAD_ARGUMENT] /region must be equal to one of the allowed values: amer, emea')
708+
.toThrow(new Error('[AdobeStateLib:ERROR_BAD_ARGUMENT] /region must be equal to one of the allowed values: amer, emea, apac'))
709709
})
710710
})
711711

types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export type OpenWhiskCredentials = {
165165
* to use ootb credentials to access the state management service. OpenWhisk
166166
* namespace and auth can also be passed through environment variables:
167167
* `__OW_NAMESPACE` and `__OW_API_KEY`
168-
* @param [config.region] - optional region to use, accepted values: `amer` (default), `emea`
168+
* @param [config.region] - optional region to use, accepted values: `amer` (default), `emea`, `apac`
169169
* @returns An AdobeState instance
170170
*/
171171
export function init(config?: {

0 commit comments

Comments
 (0)