Browse Source

remove unecessary checks

Kieran Gibb 2 years ago
parent
commit
b96326d1bb
No known key found for this signature in database
1 changed files with 4 additions and 10 deletions
  1. 4
    10
      test/index.test.js

+ 4
- 10
test/index.test.js View File

@@ -80,9 +80,7 @@ describe('group store: basic', (context) => {
80 80
       address: null
81 81
     })
82 82
 
83
-    assert.ok(Array.isArray(response), 'returns an array')
84
-    var group = response[0]
85
-    assert.notOk(group, 'fails to find a group')
83
+    assert.same(response.length, 0, 'fails to find a group')
86 84
     cleanup(storage, next)
87 85
   })
88 86
 
@@ -102,9 +100,7 @@ describe('group store: basic', (context) => {
102 100
       address: params.address
103 101
     })
104 102
 
105
-    assert.ok(Array.isArray(response), 'returns an array')
106
-    var group = response[0]
107
-    assert.notOk(group, 'fails to find a group')
103
+    assert.same(response.length, 0, 'fails to find a group')
108 104
     cleanup(storage, next)
109 105
   })
110 106
 
@@ -124,8 +120,7 @@ describe('group store: basic', (context) => {
124 120
       address: crypto.randomBytes(32).toString('hex')
125 121
     })
126 122
 
127
-    var group = response[0]
128
-    assert.notOk(group, 'fails to find a group')
123
+    assert.same(response.length, 0, 'fails to find a group')
129 124
     cleanup(storage, next)
130 125
   })
131 126
 
@@ -145,8 +140,7 @@ describe('group store: basic', (context) => {
145 140
       address: params.address
146 141
     })
147 142
 
148
-    var group = response[0]
149
-    assert.notOk(group, 'fails to find a group')
143
+    assert.same(response.length, 0, 'fails to find a group')
150 144
     cleanup(storage, next)
151 145
   })
152 146