Skip to content

Commit

Permalink
test: adapt for @hoodie/account-client@5
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

Before

```js
var account = new Account(options)
alert("Ohaj, " + account.username)
```

Now

```js
var account = new Account(options)
account.ready.then(function () {
  alert("Ohaj, " + account.username)
})
```"
  • Loading branch information
gr2m committed Dec 26, 2016
1 parent b65624e commit 4522bfb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/integration/constructor-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ test('new HoodieAdmin(options)', function (t) {
simple.mock(global, 'location', {origin: 'http://example.com'})
var account = new Account()

t.is(account.username, 'admin', 'sets username from localStorage')

simple.restore()
t.end()
account.ready.then(function () {
simple.restore()
t.is(account.username, 'admin', 'sets username from localStorage')
t.end()
})
})

0 comments on commit 4522bfb

Please sign in to comment.