pryv 2.3.2 → 2.3.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pryv",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "Pryv JavaScript library",
5
5
  "keywords": [
6
6
  "Pryv",
package/src/Service.js CHANGED
@@ -174,6 +174,7 @@ class Service {
174
174
  e.response.body.error.message) {
175
175
  throw new Error(e.response.body.error.message);
176
176
  }
177
+ throw (e);
177
178
  }
178
179
  }
179
180
  }
@@ -66,10 +66,16 @@ describe('Service', function () {
66
66
  expect(assets).to.be.null;
67
67
  });
68
68
 
69
- it('login() failed', async function () {
69
+ it('login() failed on wrong password', async function () {
70
70
  this.timeout(5000);
71
71
  const pryvService = new pryv.Service(testData.serviceInfoUrl);
72
72
  await expect(pryvService.login(testData.username, 'bobby', 'jslib-test')).to.be.rejectedWith('The given username/password pair is invalid.');
73
73
  });
74
+
75
+ it('login() failed on wrong username', async function () {
76
+ this.timeout(5000);
77
+ const pryvService = new pryv.Service(testData.serviceInfoUrl);
78
+ await expect(pryvService.login('wrong-username', 'bobby', 'jslib-test')).to.be.rejectedWith('getaddrinfo ENOTFOUND wrong');
79
+ });
74
80
  });
75
81
  });