Skip to content

Commit

Permalink
Add async await to browser test
Browse files Browse the repository at this point in the history
  • Loading branch information
Zane Starr committed Feb 26, 2019
1 parent 078ac3d commit 9bd1ff0
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions test/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@

'use strict'

const series = require('async/series')

const IPFSRepo = require('../src')

describe('IPFS Repo Tests on the Browser', () => {
require('./options-test')
const repo = new IPFSRepo('myrepo')

before((done) => {
series([
(cb) => repo.init({}, cb),
(cb) => repo.open(cb)
], done)
before(async () => {
await repo.init({})
await repo.open()
})

after((done) => {
repo.close(done)
after(async () => {
await repo.close()
})

require('./repo-test')(repo)
Expand Down

0 comments on commit 9bd1ff0

Please sign in to comment.