message: Add test for optional redirect after sign out
diff: import test from 'tape-promise/tape'
  import { decodeToken } from 'jsontokens'
  import FetchMock from 'fetch-mock'
  +import localStorage from 'mock-local-storage'
  import {
  makeAuthRequest,
  @@ -19,7 +20,8 @@ import {
  doPublicKeysMatchUsername,
  isManifestUriValid,
  isRedirectUriValid,
  - verifyAuthRequestAndLoadManifest
  + verifyAuthRequestAndLoadManifest,
  + signUserOut
  } from '../../../lib'
  import blockstack from '../../../lib'
  @@ -39,7 +41,8 @@ export function runAuthTests() {
  hostname: 'localhost',
  host: 'localhost:3000',
  href: 'http://localhost:3000/signin'
  - }
  + },
  + localStorage: global.localStorage
  }
  const authRequest = makeAuthRequest(privateKey)
  t.ok(authRequest, 'auth request should have been created')
  @@ -211,6 +214,25 @@ export function runAuthTests() {
  t.true(verifiedResult, 'auth response should be verified')
  })
  })
  +
  + test('signUserOut with redirect', (t) => {
  + t.plan(1)
  + const startURL = 'https://example.com'
  + const redirectURL = 'https://example.com/redirect'
  + window.location = startURL
  +
  + signUserOut(redirectURL)
  + t.equal(redirectURL, window.location, 'User should be redirected to the redirectURL')
  + })
  +
  + test('signUserOut without redirect', (t) => {
  + t.plan(1)
  + const startURL = 'https://example.com'
  + window.location = startURL
  +
  + signUserOut()
  + t.equal(startURL, window.location, 'User should not be redirected')
  + })
  }
  // const sampleToken = 'eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3N1ZWRBdCI6IjE0NDA3MTM0MTQuMTkiLCJjaGFsbGVuZ2UiOiIxZDc4NTBkNy01YmNmLTQ3ZDAtYTgxYy1jMDA4NTc5NzY1NDQiLCJwZXJtaXNzaW9ucyI6WyJibG9ja2NoYWluaWQiXSwiaXNzdWVyIjp7InB1YmxpY0tleSI6IjAzODI3YjZhMzRjZWJlZTZkYjEwZDEzNzg3ODQ2ZGVlYWMxMDIzYWNiODNhN2I4NjZlMTkyZmEzNmI5MTkwNjNlNCIsImRvbWFpbiI6Im9uZW5hbWUuY29tIn19.96Q_O_4DX8uPy1enosEwS2sIcyVelWhxvfj2F8rOvHldhqt9YRYilauepb95DVnmpqpCXxJb7jurT8auNCbptw'
  