Skip to content

PR #228

PR #228 #149

GitHub Actions / Test Report succeeded Oct 25, 2023 in 0s

Test Report ✅

Tests passed successfully

✅ jest-junit.xml

288 tests were completed in 106s with 227 passed, 0 failed and 61 skipped.

Test suite Passed Failed Skipped Time
harness/features/allFeatures.cloud.test.ts 3⚪ 346ms
harness/features/allFeatures.cloud.test.ts 2✅ 1⚪ 301ms
harness/features/allFeatures.local.test.ts 3✅ 660ms
harness/features/allFeatures.local.test.ts 3✅ 323ms
harness/features/allVariables.cloud.test.ts 5⚪ 292ms
harness/features/allVariables.cloud.test.ts 5✅ 7s
harness/features/allVariables.local.test.ts 2✅ 3s
harness/features/allVariables.local.test.ts 2✅ 2s
harness/features/clientCustomData.test.ts 2✅ 2s
harness/features/clientCustomData.test.ts 2✅ 1s
harness/features/initialize.cloud.test.ts 3⚪ 240ms
harness/features/initialize.cloud.test.ts 3✅ 272ms
harness/features/initialize.local.test.ts 10✅ 1⚪ 9s
harness/features/initialize.local.test.ts 10✅ 1⚪ 10s
harness/features/multithreading.local.test.ts 5⚪ 1s
harness/features/multithreading.local.test.ts 5✅ 5s
harness/features/track.cloud.test.ts 4⚪ 323ms
harness/features/track.cloud.test.ts 4✅ 518ms
harness/features/track.local.test.ts 4✅ 8s
harness/features/track.local.test.ts 4✅ 8s
harness/features/variable.cloud.test.ts 36⚪ 1s
harness/features/variable.cloud.test.ts 34✅ 2⚪ 56s
harness/features/variable.local.test.ts 66✅ 47s
harness/features/variable.local.test.ts 66✅ 53s

✅ harness/features/allFeatures.cloud.test.ts

allFeatures Tests - Cloud › GoWASM
  ⚪ should return all features without edgeDB
  ⚪ should return all features with edgeDB
  ⚪ should throw if features request fails on invalid sdk key

✅ harness/features/allFeatures.cloud.test.ts

allFeatures Tests - Cloud › Go
  ✅ should return all features without edgeDB
  ✅ should return all features with edgeDB
  ⚪ should throw if features request fails on invalid sdk key

✅ harness/features/allFeatures.local.test.ts

allFeatures Tests - Local › GoWASM › uninitialized client
  ✅ should return empty object if client is uninitialized
allFeatures Tests - Local › GoWASM › initialized client
  ✅ should return all features for user without custom data
  ✅ should return all features for user with custom data

✅ harness/features/allFeatures.local.test.ts

allFeatures Tests - Local › Go › uninitialized client
  ✅ should return empty object if client is uninitialized
allFeatures Tests - Local › Go › initialized client
  ✅ should return all features for user without custom data
  ✅ should return all features for user with custom data

✅ harness/features/allVariables.cloud.test.ts

allVariables Tests - Cloud › GoWASM
  ⚪ should return an empty object if variables request fails
  ⚪ should throw if variables request fails on user error
  ⚪ should return a variable map
  ⚪ should make a request to the variables endpoint with edgeDB param to false
  ⚪ should make a request to the variables endpoint with edgeDB param to true

✅ harness/features/allVariables.cloud.test.ts

allVariables Tests - Cloud › Go
  ✅ should return an empty object if variables request fails
  ✅ should throw if variables request fails on user error
  ✅ should return a variable map
  ✅ should make a request to the variables endpoint with edgeDB param to false
  ✅ should make a request to the variables endpoint with edgeDB param to true

✅ harness/features/allVariables.local.test.ts

allVariables Tests - Local › GoWASM
  ✅ should return an empty object if client is not initialized
  ✅ should return a variable map for a bucketed user

✅ harness/features/allVariables.local.test.ts

allVariables Tests - Local › Go
  ✅ should return an empty object if client is not initialized
  ✅ should return a variable map for a bucketed user

✅ harness/features/clientCustomData.test.ts

Client Custom Data Tests › GoWASM
  ✅ should set client custom data and use it for segmentation
  ✅ should do nothing when client has not initialized

✅ harness/features/clientCustomData.test.ts

Client Custom Data Tests › Go
  ✅ should set client custom data and use it for segmentation
  ✅ should do nothing when client has not initialized

✅ harness/features/initialize.cloud.test.ts

Client Initialize Tests - Cloud › GoWASM
  ⚪ should throw an exception and return no location if invalid SDK token is sent
  ⚪ should throw an exception and return no location if no SDK token is sent
  ⚪ should return client object location if SDK token is correct

✅ harness/features/initialize.cloud.test.ts

Client Initialize Tests - Cloud › Go
  ✅ should throw an exception and return no location if invalid SDK token is sent
  ✅ should throw an exception and return no location if no SDK token is sent
  ✅ should return client object location if SDK token is correct

✅ harness/features/initialize.local.test.ts

Initialize Tests - Local › GoWASM
  ✅ should error when SDK key is missing
  ✅ should error when SDK key is invalid
  ✅ initializes correctly on valid data
  ✅ calls initialize promise/callback when config is successfully retrieved
  ✅ calls initialize promise/callback when config fails to be retrieved
  ⚪ stops the polling interval when the sdk key is invalid and cdn responds 403, throws error
  ✅ fetches config again after 3 seconds when config polling interval is overriden
  ✅ uses the same config if the etag matches
  ✅ uses the same config if the refetch fails, after retrying once
  ✅ uses the same config if the response is invalid JSON
  ✅ uses the same config if the response is valid JSON but invalid data

✅ harness/features/initialize.local.test.ts

Initialize Tests - Local › Go
  ✅ should error when SDK key is missing
  ✅ should error when SDK key is invalid
  ✅ initializes correctly on valid data
  ✅ calls initialize promise/callback when config is successfully retrieved
  ✅ calls initialize promise/callback when config fails to be retrieved
  ⚪ stops the polling interval when the sdk key is invalid and cdn responds 403, throws error
  ✅ fetches config again after 3 seconds when config polling interval is overriden
  ✅ uses the same config if the etag matches
  ✅ uses the same config if the refetch fails, after retrying once
  ✅ uses the same config if the response is invalid JSON
  ✅ uses the same config if the response is valid JSON but invalid data

✅ harness/features/multithreading.local.test.ts

Multithreading Tests › GoWASM › initialized client
  ⚪ should return variable if SDK returns object matching default type
  ⚪ should aggregate events across threads
  ⚪ should retry events across threads
Multithreading Tests › GoWASM › initialized client › GoWASM
  ⚪ should set client custom data and use it for segmentation
Multithreading Tests › GoWASM › uninitialized client
  ⚪ should return default value if client is uninitialized, log event

✅ harness/features/multithreading.local.test.ts

Multithreading Tests › Go › initialized client
  ✅ should return variable if SDK returns object matching default type
  ✅ should aggregate events across threads
  ✅ should retry events across threads
Multithreading Tests › Go › initialized client › Go
  ✅ should set client custom data and use it for segmentation
Multithreading Tests › Go › uninitialized client
  ✅ should return default value if client is uninitialized, log event

✅ harness/features/track.cloud.test.ts

Track Tests - Cloud › GoWASM
  ⚪ should complain if event type not set
  ⚪ should call events API to track event
  ⚪ should retry events API on failed request
  ⚪ should throw if track request fails on invalid sdk key

✅ harness/features/track.cloud.test.ts

Track Tests - Cloud › Go
  ✅ should complain if event type not set
  ✅ should call events API to track event
  ✅ should retry events API on failed request
  ✅ should throw if track request fails on invalid sdk key

✅ harness/features/track.local.test.ts

Track Tests - Local › GoWASM › Expect no events sent
  ✅ should not send an event if the event type not set
Track Tests - Local › GoWASM › Expect events sent
  ✅ should call events API to track event
  ✅ should call events API to track 2 events
  ✅ should retry events API call to track 2 events and check interval of events is in specified window

✅ harness/features/track.local.test.ts

Track Tests - Local › Go › Expect no events sent
  ✅ should not send an event if the event type not set
Track Tests - Local › Go › Expect events sent
  ✅ should call events API to track event
  ✅ should call events API to track 2 events
  ✅ should retry events API call to track 2 events and check interval of events is in specified window

✅ harness/features/variable.cloud.test.ts

Variable Tests - Cloud › GoWASM
  ⚪ will throw error variable called with invalid key
  ⚪ will throw error variableValue called with invalid key
  ⚪ will throw error if variable called with invalid sdk key
  ⚪ will throw error if variableValue called with invalid sdk key
  ⚪ will throw error variable called with invalid default value
  ⚪ will throw error variableValue called with invalid default value
  ⚪ should call variable API without edgeDB option
  ⚪ should call variableValue API without edgeDB option
  ⚪ should call variable API with edgeDB option
  ⚪ should call variableValue API with edgeDB option
  ⚪ should return default if mock server returns variable mismatching default value type
  ⚪ should return default if mock server returns variableValue mismatching default value type
Variable Tests - Cloud › GoWASM › Variable string tests
  ⚪ should return default string variable if mock server returns undefined
  ⚪ should return default string variableValue if mock server returns undefined
  ⚪ should return string variable if mock server returns                 proper variable matching default value type
  ⚪ should return string variableValue if mock server returns                 proper variable matching default value type
  ⚪ should return defaulted string variable if mock server returns an internal error,                 after retrying 5 times
  ⚪ should return defaulted string variableValue if mock server returns an internal error,                 after retrying 5 times
Variable Tests - Cloud › GoWASM › Variable number tests
  ⚪ should return default number variable if mock server returns undefined
  ⚪ should return default number variableValue if mock server returns undefined
  ⚪ should return number variable if mock server returns                 proper variable matching default value type
  ⚪ should return number variableValue if mock server returns                 proper variable matching default value type
  ⚪ should return defaulted number variable if mock server returns an internal error,                 after retrying 5 times
  ⚪ should return defaulted number variableValue if mock server returns an internal error,                 after retrying 5 times
Variable Tests - Cloud › GoWASM › Variable boolean tests
  ⚪ should return default boolean variable if mock server returns undefined
  ⚪ should return default boolean variableValue if mock server returns undefined
  ⚪ should return boolean variable if mock server returns                 proper variable matching default value type
  ⚪ should return boolean variableValue if mock server returns                 proper variable matching default value type
  ⚪ should return defaulted boolean variable if mock server returns an internal error,                 after retrying 5 times
  ⚪ should return defaulted boolean variableValue if mock server returns an internal error,                 after retrying 5 times
Variable Tests - Cloud › GoWASM › Variable JSON tests
  ⚪ should return default JSON variable if mock server returns undefined
  ⚪ should return default JSON variableValue if mock server returns undefined
  ⚪ should return JSON variable if mock server returns                 proper variable matching default value type
  ⚪ should return JSON variableValue if mock server returns                 proper variable matching default value type
  ⚪ should return defaulted JSON variable if mock server returns an internal error,                 after retrying 5 times
  ⚪ should return defaulted JSON variableValue if mock server returns an internal error,                 after retrying 5 times

✅ harness/features/variable.cloud.test.ts

Variable Tests - Cloud › Go
  ✅ will throw error variable called with invalid key
  ✅ will throw error variableValue called with invalid key
  ⚪ will throw error if variable called with invalid sdk key
  ⚪ will throw error if variableValue called with invalid sdk key
  ✅ will throw error variable called with invalid default value
  ✅ will throw error variableValue called with invalid default value
  ✅ should call variable API without edgeDB option
  ✅ should call variableValue API without edgeDB option
  ✅ should call variable API with edgeDB option
  ✅ should call variableValue API with edgeDB option
  ✅ should return default if mock server returns variable mismatching default value type
  ✅ should return default if mock server returns variableValue mismatching default value type
Variable Tests - Cloud › Go › Variable string tests
  ✅ should return default string variable if mock server returns undefined
  ✅ should return default string variableValue if mock server returns undefined
  ✅ should return string variable if mock server returns                 proper variable matching default value type
  ✅ should return string variableValue if mock server returns                 proper variable matching default value type
  ✅ should return defaulted string variable if mock server returns an internal error,                 after retrying 5 times
  ✅ should return defaulted string variableValue if mock server returns an internal error,                 after retrying 5 times
Variable Tests - Cloud › Go › Variable number tests
  ✅ should return default number variable if mock server returns undefined
  ✅ should return default number variableValue if mock server returns undefined
  ✅ should return number variable if mock server returns                 proper variable matching default value type
  ✅ should return number variableValue if mock server returns                 proper variable matching default value type
  ✅ should return defaulted number variable if mock server returns an internal error,                 after retrying 5 times
  ✅ should return defaulted number variableValue if mock server returns an internal error,                 after retrying 5 times
Variable Tests - Cloud › Go › Variable boolean tests
  ✅ should return default boolean variable if mock server returns undefined
  ✅ should return default boolean variableValue if mock server returns undefined
  ✅ should return boolean variable if mock server returns                 proper variable matching default value type
  ✅ should return boolean variableValue if mock server returns                 proper variable matching default value type
  ✅ should return defaulted boolean variable if mock server returns an internal error,                 after retrying 5 times
  ✅ should return defaulted boolean variableValue if mock server returns an internal error,                 after retrying 5 times
Variable Tests - Cloud › Go › Variable JSON tests
  ✅ should return default JSON variable if mock server returns undefined
  ✅ should return default JSON variableValue if mock server returns undefined
  ✅ should return JSON variable if mock server returns                 proper variable matching default value type
  ✅ should return JSON variableValue if mock server returns                 proper variable matching default value type
  ✅ should return defaulted JSON variable if mock server returns an internal error,                 after retrying 5 times
  ✅ should return defaulted JSON variableValue if mock server returns an internal error,                 after retrying 5 times

✅ harness/features/variable.local.test.ts

Variable Tests - Local › Go › initialized client › Variable string tests
  ✅ should return variable if mock server returns object matching default type
  ✅ should return variableValue if mock server returns object matching default type
  ✅ should return default value if default type doesn't match variable type
  ✅ should return default value if default type doesn't match variableValue type
  ✅ should return default value if user is not bucketed into variable
  ✅ should return default value if user is not bucketed into variableValue
  ✅ should return default value if variable doesn't exist
  ✅ should return default value if variableValue doesn't exist
  ✅ should aggregate aggVariableDefaulted events for variable
  ✅ should aggregate aggVariableDefaulted events for variableValue
  ✅ should aggregate aggVariableEvaluated events for variable
  ✅ should aggregate aggVariableEvaluated events for variableValue
Variable Tests - Local › Go › initialized client › Variable number tests
  ✅ should return variable if mock server returns object matching default type
  ✅ should return variableValue if mock server returns object matching default type
  ✅ should return default value if default type doesn't match variable type
  ✅ should return default value if default type doesn't match variableValue type
  ✅ should return default value if user is not bucketed into variable
  ✅ should return default value if user is not bucketed into variableValue
  ✅ should return default value if variable doesn't exist
  ✅ should return default value if variableValue doesn't exist
  ✅ should aggregate aggVariableDefaulted events for variable
  ✅ should aggregate aggVariableDefaulted events for variableValue
  ✅ should aggregate aggVariableEvaluated events for variable
  ✅ should aggregate aggVariableEvaluated events for variableValue
Variable Tests - Local › Go › initialized client › Variable boolean tests
  ✅ should return variable if mock server returns object matching default type
  ✅ should return variableValue if mock server returns object matching default type
  ✅ should return default value if default type doesn't match variable type
  ✅ should return default value if default type doesn't match variableValue type
  ✅ should return default value if user is not bucketed into variable
  ✅ should return default value if user is not bucketed into variableValue
  ✅ should return default value if variable doesn't exist
  ✅ should return default value if variableValue doesn't exist
  ✅ should aggregate aggVariableDefaulted events for variable
  ✅ should aggregate aggVariableDefaulted events for variableValue
  ✅ should aggregate aggVariableEvaluated events for variable
  ✅ should aggregate aggVariableEvaluated events for variableValue
Variable Tests - Local › Go › initialized client › Variable JSON tests
  ✅ should return variable if mock server returns object matching default type
  ✅ should return variableValue if mock server returns object matching default type
  ✅ should return default value if default type doesn't match variable type
  ✅ should return default value if default type doesn't match variableValue type
  ✅ should return default value if user is not bucketed into variable
  ✅ should return default value if user is not bucketed into variableValue
  ✅ should return default value if variable doesn't exist
  ✅ should return default value if variableValue doesn't exist
  ✅ should aggregate aggVariableDefaulted events for variable
  ✅ should aggregate aggVariableDefaulted events for variableValue
  ✅ should aggregate aggVariableEvaluated events for variable
  ✅ should aggregate aggVariableEvaluated events for variableValue
Variable Tests - Local › Go › initialized client
  ✅ should return a valid unicode string for variable
  ✅ should return a valid unicode string for variableValue
Variable Tests - Local › Go › uninitialized client › Variable string tests
  ✅ should return variable default value if client is uninitialized, log event
  ✅ should return variableValue default value if client is uninitialized, log event
  ✅ should return default value for variable if client config failed, log event
  ✅ should return default value for variableValue if client config failed, log event
Variable Tests - Local › Go › uninitialized client › Variable number tests
  ✅ should return variable default value if client is uninitialized, log event
  ✅ should return variableValue default value if client is uninitialized, log event
  ✅ should return default value for variable if client config failed, log event
  ✅ should return default value for variableValue if client config failed, log event
Variable Tests - Local › Go › uninitialized client › Variable boolean tests
  ✅ should return variable default value if client is uninitialized, log event
  ✅ should return variableValue default value if client is uninitialized, log event
  ✅ should return default value for variable if client config failed, log event
  ✅ should return default value for variableValue if client config failed, log event
Variable Tests - Local › Go › uninitialized client › Variable JSON tests
  ✅ should return variable default value if client is uninitialized, log event
  ✅ should return variableValue default value if client is uninitialized, log event
  ✅ should return default value for variable if client config failed, log event
  ✅ should return default value for variableValue if client config failed, log event

✅ harness/features/variable.local.test.ts

Variable Tests - Local › GoWASM › initialized client › Variable string tests
  ✅ should return variable if mock server returns object matching default type
  ✅ should return variableValue if mock server returns object matching default type
  ✅ should return default value if default type doesn't match variable type
  ✅ should return default value if default type doesn't match variableValue type
  ✅ should return default value if user is not bucketed into variable
  ✅ should return default value if user is not bucketed into variableValue
  ✅ should return default value if variable doesn't exist
  ✅ should return default value if variableValue doesn't exist
  ✅ should aggregate aggVariableDefaulted events for variable
  ✅ should aggregate aggVariableDefaulted events for variableValue
  ✅ should aggregate aggVariableEvaluated events for variable
  ✅ should aggregate aggVariableEvaluated events for variableValue
Variable Tests - Local › GoWASM › initialized client › Variable number tests
  ✅ should return variable if mock server returns object matching default type
  ✅ should return variableValue if mock server returns object matching default type
  ✅ should return default value if default type doesn't match variable type
  ✅ should return default value if default type doesn't match variableValue type
  ✅ should return default value if user is not bucketed into variable
  ✅ should return default value if user is not bucketed into variableValue
  ✅ should return default value if variable doesn't exist
  ✅ should return default value if variableValue doesn't exist
  ✅ should aggregate aggVariableDefaulted events for variable
  ✅ should aggregate aggVariableDefaulted events for variableValue
  ✅ should aggregate aggVariableEvaluated events for variable
  ✅ should aggregate aggVariableEvaluated events for variableValue
Variable Tests - Local › GoWASM › initialized client › Variable boolean tests
  ✅ should return variable if mock server returns object matching default type
  ✅ should return variableValue if mock server returns object matching default type
  ✅ should return default value if default type doesn't match variable type
  ✅ should return default value if default type doesn't match variableValue type
  ✅ should return default value if user is not bucketed into variable
  ✅ should return default value if user is not bucketed into variableValue
  ✅ should return default value if variable doesn't exist
  ✅ should return default value if variableValue doesn't exist
  ✅ should aggregate aggVariableDefaulted events for variable
  ✅ should aggregate aggVariableDefaulted events for variableValue
  ✅ should aggregate aggVariableEvaluated events for variable
  ✅ should aggregate aggVariableEvaluated events for variableValue
Variable Tests - Local › GoWASM › initialized client › Variable JSON tests
  ✅ should return variable if mock server returns object matching default type
  ✅ should return variableValue if mock server returns object matching default type
  ✅ should return default value if default type doesn't match variable type
  ✅ should return default value if default type doesn't match variableValue type
  ✅ should return default value if user is not bucketed into variable
  ✅ should return default value if user is not bucketed into variableValue
  ✅ should return default value if variable doesn't exist
  ✅ should return default value if variableValue doesn't exist
  ✅ should aggregate aggVariableDefaulted events for variable
  ✅ should aggregate aggVariableDefaulted events for variableValue
  ✅ should aggregate aggVariableEvaluated events for variable
  ✅ should aggregate aggVariableEvaluated events for variableValue
Variable Tests - Local › GoWASM › initialized client
  ✅ should return a valid unicode string for variable
  ✅ should return a valid unicode string for variableValue
Variable Tests - Local › GoWASM › uninitialized client › Variable string tests
  ✅ should return variable default value if client is uninitialized, log event
  ✅ should return variableValue default value if client is uninitialized, log event
  ✅ should return default value for variable if client config failed, log event
  ✅ should return default value for variableValue if client config failed, log event
Variable Tests - Local › GoWASM › uninitialized client › Variable number tests
  ✅ should return variable default value if client is uninitialized, log event
  ✅ should return variableValue default value if client is uninitialized, log event
  ✅ should return default value for variable if client config failed, log event
  ✅ should return default value for variableValue if client config failed, log event
Variable Tests - Local › GoWASM › uninitialized client › Variable boolean tests
  ✅ should return variable default value if client is uninitialized, log event
  ✅ should return variableValue default value if client is uninitialized, log event
  ✅ should return default value for variable if client config failed, log event
  ✅ should return default value for variableValue if client config failed, log event
Variable Tests - Local › GoWASM › uninitialized client › Variable JSON tests
  ✅ should return variable default value if client is uninitialized, log event
  ✅ should return variableValue default value if client is uninitialized, log event
  ✅ should return default value for variable if client config failed, log event
  ✅ should return default value for variableValue if client config failed, log event