Browse Source

use cobox-group mock

Kieran Gibb 2 years ago
parent
commit
b17727047b
No known key found for this signature in database
1 changed files with 0 additions and 21 deletions
  1. 0
    21
      test/mocks.js

+ 0
- 21
test/mocks.js View File

@@ -1,21 +0,0 @@
1
-const maybe = require('call-me-maybe')
2
-
3
-function createGroup (storage, address, opts = {}) {
4
-  this.storage = storage
5
-  this.address = Buffer.from(address, 'hex')
6
-  this.encryptionKey = Buffer.from(opts.encryptionKey, 'hex')
7
-  this.name = opts.name
8
-}
9
-
10
-createGroup.prototype.ready = (callback) => maybe(callback, new Promise((resolve, reject) => resolve(true)))
11
-createGroup.prototype.toConfig = function () {
12
-  return {
13
-    name: this.name,
14
-    address: this.address,
15
-    encryptionKey: this.encryptionKey
16
-  }
17
-}
18
-
19
-module.exports = {
20
-  createGroup: (storage, address, opts) => new createGroup(storage, address, opts)
21
-}