Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit f38951c

Browse files
nginneverdaviddias
authored andcommitted
reorganize test files
1 parent ccabe76 commit f38951c

File tree

3 files changed

+14
-94
lines changed

3 files changed

+14
-94
lines changed

test/api/add.spec.js

-16
This file was deleted.

test/api/cat.spec.js

-77
This file was deleted.

test/api/files.spec.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,25 @@
55
const expect = require('chai').expect
66
const isNode = require('detect-node')
77
const path = require('path')
8+
const test = require('interface-ipfs-core')
89

910
let testfile
1011

1112
testfile = require('fs').readFileSync(path.join(__dirname, '/../testfile.txt'))
1213

13-
describe('.files', () => {
14+
// Load the add/cat/get/ls commands from interface-ipfs-core
15+
const common = {
16+
setup: function (cb) {
17+
cb(null, apiClients.a)
18+
},
19+
teardown: function (cb) {
20+
cb()
21+
}
22+
}
23+
test.files(common)
24+
25+
// Describe the (mfs) tests
26+
describe('.files (pseudo mfs)', () => {
1427
it('files.mkdir', (done) => {
1528
apiClients.a.files.mkdir('/test-folder', function (err) {
1629
expect(err).to.not.exist

0 commit comments

Comments
 (0)