From 351d01db8bb9ebe0c717a8c7c819d9e67b5834ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Thu, 8 Mar 2018 01:10:48 +0100 Subject: [PATCH 1/2] use mocha's skip for conditional tests --- js/src/files-mfs.js | 112 ++++++++++++++++++++++---------------------- js/src/files.js | 44 ++++++++--------- js/src/key.js | 12 ++--- js/src/stats.js | 16 +++---- 4 files changed, 92 insertions(+), 92 deletions(-) diff --git a/js/src/files-mfs.js b/js/src/files-mfs.js index f51a7f9d1..ccf4f7973 100644 --- a/js/src/files-mfs.js +++ b/js/src/files-mfs.js @@ -37,10 +37,10 @@ module.exports = (common) => { after((done) => common.teardown(done)) describe('.mkdir', function () { - it('make directory on root', (done) => { + it('make directory on root', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.mkdir('/test', (err) => { @@ -49,10 +49,10 @@ module.exports = (common) => { }) }) - it('make directory and its parents', (done) => { + it('make directory and its parents', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.mkdir('/test/lv1/lv2', { p: true }, (err) => { @@ -61,10 +61,10 @@ module.exports = (common) => { }) }) - it('make already existent directory', (done) => { + it('make already existent directory', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.mkdir('/', (err) => { @@ -75,10 +75,10 @@ module.exports = (common) => { }) describe('.write', function () { - it('expect error', (done) => { + it('expect error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.write('/test/a', Buffer.from('Hello, world!'), (err) => { @@ -87,10 +87,10 @@ module.exports = (common) => { }) }) - it('expect no error', (done) => { + it('expect no error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.write('/test/a', Buffer.from('Hello, world!'), {create: true}, (err) => { @@ -101,10 +101,10 @@ module.exports = (common) => { }) describe('.cp', function () { - it('copy file, expect error', (done) => { + it('copy file, expect error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.cp(['/test/c', '/test/b'], (err) => { @@ -113,10 +113,10 @@ module.exports = (common) => { }) }) - it('copy file, expect no error', (done) => { + it('copy file, expect no error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.cp(['/test/a', '/test/b'], (err) => { @@ -125,10 +125,10 @@ module.exports = (common) => { }) }) - it('copy dir, expect error', (done) => { + it('copy dir, expect error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.cp(['/test/lv1/lv3', '/test/lv1/lv4'], (err) => { @@ -137,10 +137,10 @@ module.exports = (common) => { }) }) - it('copy dir, expect no error', (done) => { + it('copy dir, expect no error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.cp(['/test/lv1/lv2', '/test/lv1/lv3'], (err) => { @@ -151,10 +151,10 @@ module.exports = (common) => { }) describe('.mv', function () { - it('move file, expect error', (done) => { + it('move file, expect error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.mv(['/test/404', '/test/a'], (err) => { @@ -163,10 +163,10 @@ module.exports = (common) => { }) }) - it('move file, expect no error', (done) => { + it('move file, expect no error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.mv(['/test/a', '/test/c'], (err) => { @@ -175,10 +175,10 @@ module.exports = (common) => { }) }) - it('move dir, expect error', (done) => { + it('move dir, expect error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.mv(['/test/lv1/404', '/test/lv1'], (err) => { @@ -187,10 +187,10 @@ module.exports = (common) => { }) }) - it('move dir, expect no error', (done) => { + it('move dir, expect no error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.mv(['/test/lv1/lv2', '/test/lv1/lv4'], (err) => { @@ -201,10 +201,10 @@ module.exports = (common) => { }) describe('.rm', function () { - it('remove file, expect error', (done) => { + it('remove file, expect error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.rm('/test/a', (err) => { @@ -213,10 +213,10 @@ module.exports = (common) => { }) }) - it('remove file, expect no error', (done) => { + it('remove file, expect no error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.rm('/test/c', (err) => { @@ -225,10 +225,10 @@ module.exports = (common) => { }) }) - it('remove dir, expect error', (done) => { + it('remove dir, expect error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.rm('/test/lv1/lv4', (err) => { @@ -237,10 +237,10 @@ module.exports = (common) => { }) }) - it('remove dir, expect no error', (done) => { + it('remove dir, expect no error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.rm('/test/lv1/lv4', {recursive: true}, (err) => { @@ -251,10 +251,10 @@ module.exports = (common) => { }) describe('.stat', function () { - it('stat not found, expect error', (done) => { + it('stat not found, expect error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.stat('/test/404', (err) => { @@ -263,10 +263,10 @@ module.exports = (common) => { }) }) - it('stat file', (done) => { + it('stat file', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.stat('/test/b', (err, stat) => { @@ -282,10 +282,10 @@ module.exports = (common) => { }) }) - it('stat dir', (done) => { + it('stat dir', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.stat('/test', (err, stat) => { @@ -303,10 +303,10 @@ module.exports = (common) => { }) describe('.read', function () { - it('read not found, expect error', (done) => { + it('read not found, expect error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.read('/test/404', (err, buf) => { @@ -316,10 +316,10 @@ module.exports = (common) => { }) }) - it('read file', (done) => { + it('read file', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.read('/test/b', (err, buf) => { @@ -331,10 +331,10 @@ module.exports = (common) => { }) describe('.ls', function () { - it('ls not found, expect error', (done) => { + it('ls not found, expect error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.ls('/test/404', (err, info) => { @@ -344,10 +344,10 @@ module.exports = (common) => { }) }) - it('ls directory', (done) => { + it('ls directory', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.ls('/test', (err, info) => { @@ -360,10 +360,10 @@ module.exports = (common) => { }) }) - it('ls -l directory', (done) => { + it('ls -l directory', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.ls('/test', { l: true }, (err, info) => { @@ -388,10 +388,10 @@ module.exports = (common) => { }) describe('.flush', function () { - it('flush not found, expect error', (done) => { + it('flush not found, expect error', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.flush('/test/404', (err) => { @@ -400,10 +400,10 @@ module.exports = (common) => { }) }) - it('flush root', (done) => { + it('flush root', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.flush((err) => { @@ -412,10 +412,10 @@ module.exports = (common) => { }) }) - it('flush specific dir', (done) => { + it('flush specific dir', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.files.flush('/test', (err) => { diff --git a/js/src/files.js b/js/src/files.js index 6205c4e03..3c0e26bcf 100644 --- a/js/src/files.js +++ b/js/src/files.js @@ -165,9 +165,9 @@ module.exports = (common) => { }) }) - it('add a nested directory as array of tupples', (done) => { + it('add a nested directory as array of tupples', function(done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 - if (!isNode) { return done() } + if (!isNode) { this.skip() } const content = (name) => ({ path: `test-folder/${name}`, @@ -197,9 +197,9 @@ module.exports = (common) => { }) }) - it('add a nested directory as array of tuppled with progress', (done) => { + it('add a nested directory as array of tuppled with progress', function(done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 - if (!isNode) { return done() } + if (!isNode) { this.skip() } const content = (name) => ({ path: `test-folder/${name}`, @@ -262,9 +262,9 @@ module.exports = (common) => { }) describe('.addReadableStream', () => { - it('stream of valid files and dirs', (done) => { + it('stream of valid files and dirs', function(done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 - if (!isNode) { return done() } + if (!isNode) { this.skip() } const content = (name) => ({ path: `test-folder/${name}`, @@ -303,9 +303,9 @@ module.exports = (common) => { }) describe('.addPullStream', () => { - it('stream of valid files and dirs', (done) => { + it('stream of valid files and dirs', function(done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 - if (!isNode) { return done() } + if (!isNode) { this.skip() } const content = (name) => ({ path: `test-folder/${name}`, @@ -535,9 +535,9 @@ module.exports = (common) => { }) }) - it('directory', (done) => { + it('directory', function(done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 - if (!isNode) { return done() } + if (!isNode) { this.skip() } series([ (cb) => { @@ -709,9 +709,9 @@ module.exports = (common) => { }) describe('.ls', () => { - before((done) => { + before(function(done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 - if (!isNode) { return done() } + if (!isNode) { this.skip() } const content = (name) => ({ path: `test-folder/${name}`, @@ -741,9 +741,9 @@ module.exports = (common) => { }) }) - it('with a base58 encoded CID', (done) => { + it('with a base58 encoded CID', function(done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 - if (!isNode) { return done() } + if (!isNode) { this.skip() } const cid = 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP' ipfs.ls(cid, (err, files) => { @@ -809,9 +809,9 @@ module.exports = (common) => { }) describe('.lsReadableStream', () => { - before((done) => { + before(function(done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 - if (!isNode) { return done() } + if (!isNode) { this.skip() } const content = (name) => ({ path: `test-folder/${name}`, @@ -841,9 +841,9 @@ module.exports = (common) => { }) }) - it('with a base58 encoded CID', (done) => { + it('with a base58 encoded CID', function(done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 - if (!isNode) { return done() } + if (!isNode) { this.skip() } const cid = 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP' const stream = ipfs.lsReadableStream(cid) @@ -892,10 +892,10 @@ module.exports = (common) => { }) }) - describe('.lsPullStream', () => { + describe('.lsPullStream', function(done) { before((done) => { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 - if (!isNode) { return done() } + if (!isNode) { this.skip() } const content = (name) => ({ path: `test-folder/${name}`, @@ -925,9 +925,9 @@ module.exports = (common) => { }) }) - it('with a base58 encoded CID', (done) => { + it('with a base58 encoded CID', function(done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 - if (!isNode) { return done() } + if (!isNode) { this.skip() } const cid = 'QmVvjDy7yF7hdnqE8Hrf4MHo5ABDtb5AbX6hWbD3Y42bXP' const stream = ipfs.lsPullStream(cid) diff --git a/js/src/key.js b/js/src/key.js index 4e60f72e3..110c64af9 100644 --- a/js/src/key.js +++ b/js/src/key.js @@ -147,10 +147,10 @@ module.exports = (common) => { let selfPem let passwordPem = hat() - it('exports', (done) => { + it('exports', function(done) { if (withGo) { console.log('Not supported by go-ipfs yet') - return done() + this.skip() } ipfs.key.export('self', passwordPem, (err, pem) => { expect(err).to.not.exist() @@ -160,10 +160,10 @@ module.exports = (common) => { }) }) - it('imports', (done) => { + it('imports', function(done) { if (withGo) { console.log('Not supported by go-ipfs yet') - return done() + this.skip() } ipfs.key.import('clone', selfPem, passwordPem, (err, key) => { expect(err).to.not.exist() @@ -174,10 +174,10 @@ module.exports = (common) => { }) }) - it('removes', (done) => { + it('removes', function(done) { if (withGo) { console.log('Not supported by go-ipfs yet') - return done() + this.skip() } ipfs.key.rm('clone', (err) => { expect(err).to.not.exist() diff --git a/js/src/stats.js b/js/src/stats.js index 491c65317..c1f8442e2 100644 --- a/js/src/stats.js +++ b/js/src/stats.js @@ -51,10 +51,10 @@ module.exports = (common) => { }) }) - it('.bw', (done) => { + it('.bw', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } ipfs.stats.bw((err, res) => { @@ -63,10 +63,10 @@ module.exports = (common) => { }) }) - it('.bw Promise', () => { + it('.bw Promise', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return + this.skip() } return ipfs.stats.bw().then((res) => { @@ -74,10 +74,10 @@ module.exports = (common) => { }) }) - it('.bwReadableStream', (done) => { + it('.bwReadableStream', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } const stream = ipfs.stats.bwReadableStream() @@ -89,10 +89,10 @@ module.exports = (common) => { }) }) - it('.bwPullStream', (done) => { + it('.bwPullStream', function(done) { if (!withGo) { console.log('Not supported in js-ipfs yet') - return done() + this.skip() } const stream = ipfs.stats.bwPullStream() From 98958fbf72daf7ba7208ff407a48c3031923aa2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Fri, 9 Mar 2018 11:13:46 +0100 Subject: [PATCH 2/2] fix coding style --- js/src/files-mfs.js | 56 ++++++++++++++++++++++----------------------- js/src/files.js | 22 +++++++++--------- js/src/key.js | 6 ++--- js/src/stats.js | 8 +++---- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/js/src/files-mfs.js b/js/src/files-mfs.js index ccf4f7973..fe7221f5d 100644 --- a/js/src/files-mfs.js +++ b/js/src/files-mfs.js @@ -37,7 +37,7 @@ module.exports = (common) => { after((done) => common.teardown(done)) describe('.mkdir', function () { - it('make directory on root', function(done) { + it('make directory on root', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -49,7 +49,7 @@ module.exports = (common) => { }) }) - it('make directory and its parents', function(done) { + it('make directory and its parents', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -61,7 +61,7 @@ module.exports = (common) => { }) }) - it('make already existent directory', function(done) { + it('make already existent directory', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -75,7 +75,7 @@ module.exports = (common) => { }) describe('.write', function () { - it('expect error', function(done) { + it('expect error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -87,7 +87,7 @@ module.exports = (common) => { }) }) - it('expect no error', function(done) { + it('expect no error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -101,7 +101,7 @@ module.exports = (common) => { }) describe('.cp', function () { - it('copy file, expect error', function(done) { + it('copy file, expect error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -113,7 +113,7 @@ module.exports = (common) => { }) }) - it('copy file, expect no error', function(done) { + it('copy file, expect no error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -125,7 +125,7 @@ module.exports = (common) => { }) }) - it('copy dir, expect error', function(done) { + it('copy dir, expect error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -137,7 +137,7 @@ module.exports = (common) => { }) }) - it('copy dir, expect no error', function(done) { + it('copy dir, expect no error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -151,7 +151,7 @@ module.exports = (common) => { }) describe('.mv', function () { - it('move file, expect error', function(done) { + it('move file, expect error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -163,7 +163,7 @@ module.exports = (common) => { }) }) - it('move file, expect no error', function(done) { + it('move file, expect no error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -175,7 +175,7 @@ module.exports = (common) => { }) }) - it('move dir, expect error', function(done) { + it('move dir, expect error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -187,7 +187,7 @@ module.exports = (common) => { }) }) - it('move dir, expect no error', function(done) { + it('move dir, expect no error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -201,7 +201,7 @@ module.exports = (common) => { }) describe('.rm', function () { - it('remove file, expect error', function(done) { + it('remove file, expect error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -213,7 +213,7 @@ module.exports = (common) => { }) }) - it('remove file, expect no error', function(done) { + it('remove file, expect no error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -225,7 +225,7 @@ module.exports = (common) => { }) }) - it('remove dir, expect error', function(done) { + it('remove dir, expect error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -237,7 +237,7 @@ module.exports = (common) => { }) }) - it('remove dir, expect no error', function(done) { + it('remove dir, expect no error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -251,7 +251,7 @@ module.exports = (common) => { }) describe('.stat', function () { - it('stat not found, expect error', function(done) { + it('stat not found, expect error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -263,7 +263,7 @@ module.exports = (common) => { }) }) - it('stat file', function(done) { + it('stat file', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -282,7 +282,7 @@ module.exports = (common) => { }) }) - it('stat dir', function(done) { + it('stat dir', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -303,7 +303,7 @@ module.exports = (common) => { }) describe('.read', function () { - it('read not found, expect error', function(done) { + it('read not found, expect error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -316,7 +316,7 @@ module.exports = (common) => { }) }) - it('read file', function(done) { + it('read file', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -331,7 +331,7 @@ module.exports = (common) => { }) describe('.ls', function () { - it('ls not found, expect error', function(done) { + it('ls not found, expect error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -344,7 +344,7 @@ module.exports = (common) => { }) }) - it('ls directory', function(done) { + it('ls directory', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -360,7 +360,7 @@ module.exports = (common) => { }) }) - it('ls -l directory', function(done) { + it('ls -l directory', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -388,7 +388,7 @@ module.exports = (common) => { }) describe('.flush', function () { - it('flush not found, expect error', function(done) { + it('flush not found, expect error', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -400,7 +400,7 @@ module.exports = (common) => { }) }) - it('flush root', function(done) { + it('flush root', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -412,7 +412,7 @@ module.exports = (common) => { }) }) - it('flush specific dir', function(done) { + it('flush specific dir', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() diff --git a/js/src/files.js b/js/src/files.js index 3c0e26bcf..f98176792 100644 --- a/js/src/files.js +++ b/js/src/files.js @@ -165,7 +165,7 @@ module.exports = (common) => { }) }) - it('add a nested directory as array of tupples', function(done) { + it('add a nested directory as array of tupples', function (done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 if (!isNode) { this.skip() } @@ -197,7 +197,7 @@ module.exports = (common) => { }) }) - it('add a nested directory as array of tuppled with progress', function(done) { + it('add a nested directory as array of tuppled with progress', function (done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 if (!isNode) { this.skip() } @@ -262,7 +262,7 @@ module.exports = (common) => { }) describe('.addReadableStream', () => { - it('stream of valid files and dirs', function(done) { + it('stream of valid files and dirs', function (done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 if (!isNode) { this.skip() } @@ -303,7 +303,7 @@ module.exports = (common) => { }) describe('.addPullStream', () => { - it('stream of valid files and dirs', function(done) { + it('stream of valid files and dirs', function (done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 if (!isNode) { this.skip() } @@ -535,7 +535,7 @@ module.exports = (common) => { }) }) - it('directory', function(done) { + it('directory', function (done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 if (!isNode) { this.skip() } @@ -709,7 +709,7 @@ module.exports = (common) => { }) describe('.ls', () => { - before(function(done) { + before(function (done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 if (!isNode) { this.skip() } @@ -741,7 +741,7 @@ module.exports = (common) => { }) }) - it('with a base58 encoded CID', function(done) { + it('with a base58 encoded CID', function (done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 if (!isNode) { this.skip() } @@ -809,7 +809,7 @@ module.exports = (common) => { }) describe('.lsReadableStream', () => { - before(function(done) { + before(function (done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 if (!isNode) { this.skip() } @@ -841,7 +841,7 @@ module.exports = (common) => { }) }) - it('with a base58 encoded CID', function(done) { + it('with a base58 encoded CID', function (done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 if (!isNode) { this.skip() } @@ -892,7 +892,7 @@ module.exports = (common) => { }) }) - describe('.lsPullStream', function(done) { + describe('.lsPullStream', function (done) { before((done) => { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 if (!isNode) { this.skip() } @@ -925,7 +925,7 @@ module.exports = (common) => { }) }) - it('with a base58 encoded CID', function(done) { + it('with a base58 encoded CID', function (done) { // TODO: https://github.com/ipfs/js-ipfs-api/issues/339 if (!isNode) { this.skip() } diff --git a/js/src/key.js b/js/src/key.js index 110c64af9..96109570b 100644 --- a/js/src/key.js +++ b/js/src/key.js @@ -147,7 +147,7 @@ module.exports = (common) => { let selfPem let passwordPem = hat() - it('exports', function(done) { + it('exports', function (done) { if (withGo) { console.log('Not supported by go-ipfs yet') this.skip() @@ -160,7 +160,7 @@ module.exports = (common) => { }) }) - it('imports', function(done) { + it('imports', function (done) { if (withGo) { console.log('Not supported by go-ipfs yet') this.skip() @@ -174,7 +174,7 @@ module.exports = (common) => { }) }) - it('removes', function(done) { + it('removes', function (done) { if (withGo) { console.log('Not supported by go-ipfs yet') this.skip() diff --git a/js/src/stats.js b/js/src/stats.js index c1f8442e2..af9736e13 100644 --- a/js/src/stats.js +++ b/js/src/stats.js @@ -51,7 +51,7 @@ module.exports = (common) => { }) }) - it('.bw', function(done) { + it('.bw', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -63,7 +63,7 @@ module.exports = (common) => { }) }) - it('.bw Promise', function(done) { + it('.bw Promise', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -74,7 +74,7 @@ module.exports = (common) => { }) }) - it('.bwReadableStream', function(done) { + it('.bwReadableStream', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip() @@ -89,7 +89,7 @@ module.exports = (common) => { }) }) - it('.bwPullStream', function(done) { + it('.bwPullStream', function (done) { if (!withGo) { console.log('Not supported in js-ipfs yet') this.skip()