Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 7311b03

Browse files
authored
tests - cli - dag - update for new test format
1 parent 751c379 commit 7311b03

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

test/cli/test-dag.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,22 @@
22
'use strict'
33

44
const expect = require('chai').expect
5-
const repoPath = require('./index').repoPath
65
const describeOnlineAndOffline = require('../utils/on-and-off')
7-
const ipfs = require('../utils/ipfs-exec')(repoPath)
86

9-
describe('dag', () => {
10-
describeOnlineAndOffline(repoPath, () => {
7+
describe('dag', () => runOnAndOff((thing) => {
8+
let ipfs
9+
10+
before(() => {
11+
ipfs = thing.ipfs
12+
})
13+
14+
describeOnlineAndOffline(repoPath, (tester) => {
1115
it('get', () => {
1216
return ipfs('dag get z43AaGF23fmvRnDP56Ub9WcJCfzSfqtmzNCCvmz5eudT8dtdCDS/parentHash').then((out) => {
1317
let expectHash = new Buffer('c8c0a17305adea9bbb4b98a52d44f0c1478f5c48fc4b64739ee805242501b256', 'hex')
1418
expect(out).to.be.eql(expectHash)
1519
})
1620
})
1721
})
18-
})
22+
23+
}))

0 commit comments

Comments
 (0)