From 699bd2592aa2b3ec77152f6bdad732f1a624f262 Mon Sep 17 00:00:00 2001 From: haad Date: Mon, 5 Dec 2016 16:49:29 +0100 Subject: [PATCH] Add pubsub tests from interface-ipfs-core. --- src/core/index.js | 2 +- test/core/both/index.js | 1 + test/core/both/test-pubsub.js | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 test/core/both/test-pubsub.js diff --git a/src/core/index.js b/src/core/index.js index d53394c55b..8fd07122c5 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -69,5 +69,5 @@ function IPFS (repoInstance) { this.files = files(this) this.bitswap = bitswap(this) this.ping = ping(this) - this.floodsub = floodsub(this) + this.pubsub = floodsub(this) } diff --git a/test/core/both/index.js b/test/core/both/index.js index a6dc8e5621..5b27dd5e69 100644 --- a/test/core/both/index.js +++ b/test/core/both/index.js @@ -10,4 +10,5 @@ describe('--both', () => { require('./test-generic') require('./test-init') require('./test-object') + require('./test-pubsub') }) diff --git a/test/core/both/test-pubsub.js b/test/core/both/test-pubsub.js new file mode 100644 index 0000000000..3626189bc3 --- /dev/null +++ b/test/core/both/test-pubsub.js @@ -0,0 +1,21 @@ +/* eslint-env mocha */ +'use strict' + +const test = require('interface-ipfs-core') +const IPFSFactory = require('../../utils/factory-core') + +let factory + +console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") + +const common = { + setup: function (cb) { + factory = new IPFSFactory() + cb(null, factory) + }, + teardown: function (cb) { + factory.dismantle(cb) + } +} + +test.pubsub(common)