@bluedot-innovation/models 2.0.0-alpha.11 → 2.0.0-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,5 +60,15 @@ testCase('Zone - Action', () => {
60
60
  done()
61
61
  })
62
62
  })
63
+ assertions('should throw an error when an no geofeature is instantiated within a zone', (done) => {
64
+ zone.geofeatures = []
65
+ let Zone = new ZoneModel(zone)
66
+ Zone.validate((err, res) => {
67
+ assert.exists(err, 'err object should exist')
68
+ assert.isObject(err)
69
+ assert('geofeatures' in err.errors)
70
+ done()
71
+ })
72
+ })
63
73
  })
64
74
  })
package/models/Beacon.js CHANGED
@@ -82,11 +82,11 @@ function validateBeaconType (v, cb) {
82
82
  let bothRegex = new RegExp(/(both)/ig)
83
83
 
84
84
  if (androidRegex.test(beaconType)) {
85
- magicCallback((!!macAddress && !!txPower), 'Beacon type "Android" must have both mac address and tx power values')
85
+ magicCallback((!!macAddress && !!txPower), 'Beacon type `Android` must have both mac address and tx power values')
86
86
  } else if (iosRegex.test(beaconType)) {
87
- magicCallback((!!minor && !!major), 'Beacon type "IOS" must have both minor and major values')
87
+ magicCallback((!!minor && !!major), 'Beacon type `IOS` must have both minor and major values')
88
88
  } else if (bothRegex.test(beaconType)) {
89
- magicCallback((!!minor && !!major && !!txPower && !!macAddress), 'Beacon type "Both" must have all of minor, major, tx power, and mac address values')
89
+ magicCallback((!!minor && !!major && !!txPower && !!macAddress), 'Beacon type `Both` must have all of minor, major, tx power, and mac address values')
90
90
  } else {
91
91
  magicCallback(true)
92
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "2.0.0-alpha.11",
3
+ "version": "2.0.0-alpha.12",
4
4
  "description": "",
5
5
  "main": "Models.js",
6
6
  "scripts": {