pryv 2.3.8 → 2.3.9
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/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `pryv`: JS library for Pryv.io
|
|
2
2
|
|
|
3
|
+
[](https://codecov.io/gh/pryv/lib-js)
|
|
4
|
+
|
|
3
5
|
JavaScript library and add-ons for writing Node.js and browser apps connecting to a Pryv.io platform. It follows the [Pryv.io app guidelines](https://api.pryv.com/guides/app-guidelines/).
|
|
4
6
|
|
|
5
7
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pryv",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.9",
|
|
4
4
|
"description": "Pryv JavaScript library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Pryv",
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git://github.com/pryv/lib-js"
|
|
16
16
|
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"superagent": "^8.0.6"
|
|
19
|
+
},
|
|
17
20
|
"license": "BSD-3-Clause",
|
|
18
21
|
"author": "Pryv S.A. <info@pryv.com> (https://pryv.com)",
|
|
19
22
|
"main": "src/index.js",
|
package/test/Browser.test.js
CHANGED
package/test/Connection.test.js
CHANGED
|
@@ -20,7 +20,7 @@ if (isNode) { // node
|
|
|
20
20
|
|
|
21
21
|
describe('Connection', () => {
|
|
22
22
|
before(async function () {
|
|
23
|
-
this.timeout(
|
|
23
|
+
this.timeout(15000);
|
|
24
24
|
await testData.prepare();
|
|
25
25
|
conn = new pryv.Connection(testData.apiEndpointWithToken);
|
|
26
26
|
|
|
@@ -90,7 +90,7 @@ describe('Connection', () => {
|
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
describe('.api()', function () {
|
|
93
|
-
this.timeout(
|
|
93
|
+
this.timeout(15000);
|
|
94
94
|
it('.api() events.get', async () => {
|
|
95
95
|
const res = await conn.api(
|
|
96
96
|
[
|
|
@@ -317,7 +317,7 @@ describe('Connection', () => {
|
|
|
317
317
|
});
|
|
318
318
|
|
|
319
319
|
describe('Streamed event get', function () {
|
|
320
|
-
this.timeout(
|
|
320
|
+
this.timeout(15000);
|
|
321
321
|
const now = (new Date()).getTime() / 1000 + 1000;
|
|
322
322
|
|
|
323
323
|
describe('Node & Browser', function () {
|
|
@@ -421,7 +421,7 @@ describe('Connection', () => {
|
|
|
421
421
|
{
|
|
422
422
|
method: 'accesses.create',
|
|
423
423
|
params: {
|
|
424
|
-
name: 'test',
|
|
424
|
+
name: 'test' + Math.round(Math.random() * 10000),
|
|
425
425
|
permissions: [
|
|
426
426
|
{
|
|
427
427
|
streamId: 'data',
|
package/test/Service.test.js
CHANGED
|
@@ -9,7 +9,7 @@ const isNode = (typeof window === 'undefined');
|
|
|
9
9
|
|
|
10
10
|
describe('Service', function () {
|
|
11
11
|
before(async function () {
|
|
12
|
-
this.timeout(
|
|
12
|
+
this.timeout(15000);
|
|
13
13
|
await testData.prepare();
|
|
14
14
|
});
|
|
15
15
|
|
|
@@ -36,7 +36,7 @@ describe('Service', function () {
|
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
it('login()', async function () {
|
|
39
|
-
this.timeout(
|
|
39
|
+
this.timeout(15000);
|
|
40
40
|
const pryvService = new pryv.Service(testData.serviceInfoUrl);
|
|
41
41
|
const conn = await pryvService.login(testData.username, testData.password, 'jslib-test');
|
|
42
42
|
expect(conn).to.exist;
|
|
@@ -69,13 +69,13 @@ describe('Service', function () {
|
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
it('login() failed on wrong password', async function () {
|
|
72
|
-
this.timeout(
|
|
72
|
+
this.timeout(15000);
|
|
73
73
|
const pryvService = new pryv.Service(testData.serviceInfoUrl);
|
|
74
74
|
await expect(pryvService.login(testData.username, 'bobby', 'jslib-test')).to.be.rejectedWith('The given username/password pair is invalid.');
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
it('login() failed on wrong username', async function () {
|
|
78
|
-
this.timeout(
|
|
78
|
+
this.timeout(15000);
|
|
79
79
|
const pryvService = new pryv.Service(testData.serviceInfoUrl);
|
|
80
80
|
// check if username is in path or domain
|
|
81
81
|
try {
|