• Robert Knight's avatar
    Refactor `SessionService` to a more idiomatic ES class · 1c3aa03b
    Robert Knight authored
     - Convert closures into methods
    
     - Remove the `profileFetchRetryOpts` field that was used only to shorten the
       delay between retries in tests, in favor of mocking
       `retryPromiseOperation` in tests to remove the delay between retries.
    
     - Change `SessionService` instance creation in tests to allow
       individual tests to run custom setup logic before the service is
       constructed. This was needed due to allow the `serviceConfig` mock to
       take effect when the `SessionService` constructor runs
    
     - Remove unnecessary custom Sinon sandbox in tests
    1c3aa03b
index.js 6.63 KB