Home Reference Source Test Repository

Test

Description Identifier Count

should call the refresh token endpoint in the auth proxy

-

should retry the call to the refresh token endpoint in the auth proxy if it receives a bad response the first time

-

should retry the call to the refresh token endpoint in the auth proxy up to 3 times, but then error out

-

should throw a TypeError

-

should throw a TypeError

-

should call the logout endpoint in the auth proxy

-

should throw an error if the response is not 'ok'

-

should throw a TypeError

-

should throw a TypeError

-

should throw an error if not configured properly

-

should make a request to authProxyUrl when called

-

should make a request to authProxyUrl with additional scopes when scopes are passed in

-

should throw an error if not configured properly

-

should throw an error if no active device code exists

-

should return a Promise that rejects if the active device code is expired

-

should return a Promise that resolves to a valid access token if device code is valid

-

should return a Promise that rejects if the active device code is invalid (or possibly expired)

-

should return a Promise that rejects if the active device code is valid but the user went to log in and denied the app access

-

should return a Promise that resolves to valid access token after polling a number of times if the user logs in

-

should return a Promise that rejects if the returned access token is invalid

-

should make a request to /user

-

should validate the station, and then make a PUT request to identity/stations

-

should fail if a non-numeric station ID is passed in

-

should reject the promise if station finder returns a 404

-

should validate the aggregation, and then make a POST request to identity/following

-

should throw a TypeError if a non-numeric aggregation ID is passed in

-

should validate the aggregation, and then make a POST request to identity/following

-

should throw a TypeError if a non-numeric aggregation ID is passed in

-

should make a request to NPR proxy when called

-

should make a request to NPR proxy when called using the correct query param character

-

should throw a TypeError

-

should throw a TypeError

-

should throw an exception if access token is not supplied

-

should make a request to /recommendations with channel npr if a bad channel is passed in

-

should make a request to /recommendations when no queued ratings exist

-

should return the currently executing promise if called again before first promise has resolved

-

should make a request to /recommendations with a custom channel when no queued ratings exist and a channel is specified

-

should include x- headers if supplied in config when making API requests

-

should make /recommendations request with sharedMediaId when a UID is given

-

should make a request to /ratings when a rating is queued

-

should make a request to /ratings and not send duplicate ratings if an action was record twice

-

should return the same recommendation when no START rating has been received

-

should return a different recommendation when a START rating has been received

-

should return a different recommendation when a TIMEOUT rating has been received

-

should return a different recommendation when a TAPTHRU rating has been received

-

should fire impression url GET requests for sponsorship when a START happens

-

should disable ads when an adblocker is present

-

should progress through the flow normally

-

should go to sponsored channel on TAPTHRU to sponsorship [tests related]

-

should go to action URL on TAPTHRU of promo [tests action, or callsToAction]

-

should throw when no API recommendations are returned and no previous exist

-

should call the refresh token endpoint in the auth proxy if the getRecommendations call returns a 401, and then retry the request

-

should NOT make a new API call if the UID is present in the cached list, and return that item

-

should make a new API call if the UID is not found in the list

-

should make a GET request when no flow recommendations are present

-

should NOT make a GET request when flow recommendations are present

-

should make a GET request with a custom channel when no flow recommendations are present and a channel is specified

-

should make a GET request to the default channel ("recommended") if no channel is specified

-

should make a GET request to the specified channel if a channel is specified

-

should make a GET request to the default channel ("recommended") if an invalid channel format is supplied

-

should flush any pending ratings before returning channel recommendations

-

should throw a TypeError if no channel is specified

-

should throw a TypeError if a channel is specified but is not a valid string

-

should throw a TypeError if no UID is specified

-

should throw a TypeError if a channel is specified but is not a valid string

-

should throw an Error if getRecommendationsFromChannel() was not previously called

-

should throw an Error

-

should throw an Error if the uid is not found in the list

-

should return the found recommendation if the UID is present in the cached list

-

should put the found recommendation at the top of the flow recommendations if the UID is present in the cached list

-

should make a request to /history when getHistory is called

-

should return a fulfilled promise

-

should reset internal variables to allow the flow to reset

-

should send the queued ratings first, then reset

-
unit/controller/listening.js -

should make a request to /stationfinder/stations and find two stations

-

should include the query string in the search if one is given

-

should throw an error when given an invalid query string

-

should return an empty array if no stations results were found

-

should make a request to /stationfinder/stations and find two stations

-

should throw an error when given an invalid values

-

should make a request to /stationfinder/stations and find two stations

-

should throw an error when given an invalid values

-

should make a request to /stationfinder/stations and find two stations

-

should throw an error when given an invalid values

-

should make a request to /stationfinder/stations and find two stations

-

should make a request to /stationfinder/stations and find the requested station

-

should make a request to /stationfinder/stations and return a promise that rejects if the requested station is a non-NPR One station

-

should throw an error when given an invalid values

-

should return an object with config related properties

-

should update specific config values when set

-

should setup defaults if they haven't been set yet

-

should log a warning when setting deprecated properties

-

should return the value of the accessToken string in the hidden config object

-

should throw a TypeError if the passed-in value is not a string

-

should set the internal access token to the supplied string

-

should call the registered callback if one is set

-

but only if the new token is different from the old

-

should throw a TypeError if the passed-in value is not a function

-

should return the Action class

-

should return the Logger class

-

should call the correct service controller method

-

should call the correct service controller method with non-default param values

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method with non-default param values

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method with non-default param values

-

should call the correct service controller method with non-default param values

-

should call the correct service controller method

-

should call the correct service controller method with non-default param values

-

should call the correct service controller method

-

should call the correct service controller method with non-default param values

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method with non-default param values

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method

-

should call the correct service controller method

-

should return the correct API service url

-

should throw if an invalid service name is specified

-

should not set an expiry date if expires_in is NaN

-

should not throw an error on valid input

-

should not be expired for test data token

-

should be expired if the expires_in time is in the past

-

should match the "access_token" value from the API response

-

should convert the "expires_in" value from the API response (which is in seconds) to milliseconds

-

should match the "access_token" value from the API response

-

should exist

-

should exist

-

should exist

-

should exist

-

should exist

-

should exist

-

should exist

-

should exist

-

should exist

-

should exist

-

should include what is specified

-

should include what is specified

-

should be true for valid actions

-

should be false for invalid actions

-

should match the API response

-

should not set an expiry date if expires_in is NaN

-

should not throw an error on valid input

-

should not be expired for test data token

-

should be expired if the expires_in time is in the past

-

should match the "user_code" value from the API response

-

should match the "verification_uri" value from the API response

-

should convert the "expires_in" value from the API response (which is in seconds) to milliseconds

-

should convert the "interval" value from the API response (which is in seconds) to milliseconds

-

should match the API response

-

should hydrate the model

-

should match what is specified

-

should remove private member variables

-

should throw an error if audio doesn't exist

-

should throw an error if recommendations doesn't exist

-

should throw an error if attributes.rating doesn't exist

-

should match the API response

-

should match the API response

-

should match the API response

-

should match the API response

-

should match the API response

-

should match the API response

-

should match the API response

-

should match the API response

-

should return a ratings object

-

should match the API response

-

should match the API response

-

should only use urls that start with nprone://

-

should be true for an ad

-

should be false for non ads

-

should be true for recommendations with onramps

-

should be false for recommendations without onramps

-

should match the format specified

-

should only allow valid ratings

-

should require elapsed time to be an integer

-

should auto-correct bad elapsed time values

-

should auto-correct bad elapsed time values but only if duration is greater than 0

-

should warn developers when a zero elapsed time is given for a COMPLETED or SKIP

-

should warn developers when a non-START rating is received before START

-

should auto-correct bad elapsed time values if the difference is more than 30

-

should execute a GET request against all impression URLs

-

but only on the first START rating and not subsequent STARTs

-

should call the callback set via setRatingReceivedCallback

-

should be true when a recommendation actually has that rating

-

should be false when a recommendation does not have that rating

-

should be true when a recommendation has a finished rating

-

should exist and equal the value from the test data

-

should equal name from the test data

-

should equal rel="logo" brand link if it exists

-

should be null and NOT the rel="small-logo" brand link if equal rel="logo" brand link does not exist

-

should be null if none of the above exist

-

should exist on test data

-

should be an empty string if it does not exist

-

should exist on test data

-

should omit call if it does not exist on test data

-

should omit band if it does not exist on test data

-

should omit frequency if it does not exist on test data

-

should return null if all attempted data is missing

-

should exist on test data

-

should exist on test data

-

should be null if only non-rel="homepage" links exist

-

should be null if none of the above exist

-

should equal type 27 donation link if it exists

-

should equal type 4 donation link if type 27 donation does not exist

-

should be null if none of the above exist

-

should exist on test data

-

should exist on test data

-

should hydrate the model

-

should be true for a temporary user

-

should be false for a non-temporary user

-

should match the API response

-

should match the API response

-

should return an array even if the API data is undefined

-

should match the API response

-

should return an array even if the API data is undefined

-

should match the API response

-

should match the "id" value from the API response

-

should create an array of recommendations with valid input

-

should filter out recommendations which are not valid

-

should not throw an error on valid input

-

should throw an error on invalid input

-

should not throw an error on valid input

-

should throw an error on invalid input

-

should not throw an error on valid input

-

should throw an error on invalid input

-