Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

check all data attributes

  • Loading branch information...
commit 076feee809194a7dd226a5970964baa605c63ad5 1 parent 70b137a
swdyh authored

Showing 1 changed file with 4 additions and 8 deletions. Show diff stats Hide diff stats

  1. 12  test/test.js
12  test/test.js
@@ -11,18 +11,14 @@ function testParseAirpotOutput(t) {
11 11
 
12 12
 function testParseIwlistOutput(t) {
13 13
     var d = wifiLocation.parseIwlistOutput(t)
14  
-    assert.equal(d.length, 5)
15  
-    assert.ok(d[0].Address)
16  
-    assert.ok(d[0].ESSID)
17  
-    assert.ok(d[0]['Signal level'])
  14
+    assert.ok(d.length > 1)
  15
+    assert.ok(d.every(function(i) { return i.ESSID && i.Address && i['Signal level'] }))
18 16
 }
19 17
 
20 18
 function testWifiTowers(t, platform) {
21 19
     wifiLocation.wifiTowers({ t: t, platform: platform }, function(err, val) {
22  
-        assert(val.length > 1)
23  
-        assert.ok(val[0].ssid)
24  
-        assert.ok(val[0].mac_address)
25  
-        assert.ok(val[0].signal_strength)
  20
+        assert.ok(val.length > 1)
  21
+        assert.ok(val.every(function(i) { return i.ssid && i.mac_address && i.signal_strength }))
26 22
     })
27 23
 }
28 24
 

0 notes on commit 076feee

Please sign in to comment.
Something went wrong with that request. Please try again.