-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1825 from rudderlabs/master
chore: sync master to rudder-saas
- Loading branch information
Showing
19 changed files
with
887 additions
and
40 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
28 changes: 28 additions & 0 deletions
28
test/__tests__/__integration_util_test__/isHybridModeEnabled.test.js
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,28 @@ | ||
const { isHybridModeEnabled } = require("../../../src/v0/util"); | ||
|
||
describe("isHybridModeEnabled util test", () => { | ||
test("Both flags(useNativeSDK and useNativeSDKToSend) are not present", () => { | ||
const isHybridMode = isHybridModeEnabled({}); | ||
expect(isHybridMode).toEqual(false); | ||
}); | ||
|
||
test("useNativeSDKToSend flag is not present", () => { | ||
const isHybridMode = isHybridModeEnabled({useNativeSDK: false}); | ||
expect(isHybridMode).toEqual(false); | ||
}); | ||
|
||
test("Both flags(useNativeSDK and useNativeSDKToSend) are present and hybridMode is enabled", () => { | ||
const isHybridMode = isHybridModeEnabled({useNativeSDK: true, useNativeSDKToSend: false}); | ||
expect(isHybridMode).toEqual(true); | ||
}); | ||
|
||
test("Both flags(useNativeSDK and useNativeSDKToSend) are present and device mode is enabled", () => { | ||
const isHybridMode = isHybridModeEnabled({useNativeSDK: true, useNativeSDKToSend: true}); | ||
expect(isHybridMode).toEqual(false); | ||
}); | ||
|
||
test("Both flags(useNativeSDK and useNativeSDKToSend) are present and cloud mode is enabled", () => { | ||
const isHybridMode = isHybridModeEnabled({useNativeSDK: false, useNativeSDKToSend: false}); | ||
expect(isHybridMode).toEqual(false); | ||
}); | ||
}); |
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
Oops, something went wrong.