-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use server bundle for react native (#363)
* chore: use server bundle for react native * Fixes failing token flow tests due to error object not being set Co-authored-by: Shuo Wu <wushuo2010@gmail.com> Co-authored-by: Vijet Mahabaleshwar <vijet.mahabaleshwar@okta.com>
- Loading branch information
1 parent
2920ade
commit a4a299c
Showing
8 changed files
with
84 additions
and
9 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
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
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,33 @@ | ||
const builderUtil = require('../../lib/builderUtil'); | ||
|
||
const SDK_VERSION = '0.0.0'; | ||
|
||
describe('builderUtil', () => { | ||
|
||
describe('getUserAgent', () => { | ||
it('should return userAgent if "userAgent" is provided in args', () => { | ||
const args = { | ||
userAgent: { | ||
value: 'fake userAgent' | ||
} | ||
}; | ||
const userAgent = builderUtil.getUserAgent(args); | ||
expect(userAgent).toEqual('fake userAgent'); | ||
}); | ||
it('should replace "$OKTA_AUTH_JS" with current authJs version if only with userAgentTemplate in args', () => { | ||
const args = { | ||
userAgent: { | ||
template: 'fake userAgent $OKTA_AUTH_JS' | ||
} | ||
}; | ||
const userAgent = builderUtil.getUserAgent(args, SDK_VERSION); | ||
expect(userAgent).toEqual(`fake userAgent okta-auth-js/0.0.0`); | ||
}); | ||
it('should return undefined if neither with userAgent nor userAgentTemplate in args', () => { | ||
const args = {}; | ||
const userAgent = builderUtil.getUserAgent(args); | ||
expect(userAgent).toEqual(''); | ||
}); | ||
}); | ||
|
||
}); |
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