deno.land / x / google_play_scraper@v10.0.0 / test / lib.permissions.js

lib.permissions.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import gplay from '../index.js';import { assert } from 'chai';
describe('Permissions method', () => { it('should return an array of permissions and descriptions', () => gplay.permissions({ appId: 'com.sgn.pandapop.gp' }) .then((results) => { assert(results.length); results.forEach((perm) => { assert.isString(perm.permission); assert.isString(perm.type); }); }));
it('should return an array of permissions and descriptions for different response format', () => gplay.permissions({ appId: 'air.tv.ingames.cubematch.free' }) .then((results) => { assert(results.length); results.forEach((perm) => { assert.isString(perm.permission); assert.isString(perm.type); }); }));
it('should return skip descriptions if short option is passed', () => gplay.permissions({ appId: 'com.sgn.pandapop.gp', short: true }) .then((results) => { assert(results.length); results.map(assert.isString); }));
it('should return skip descriptions if short option is passed for different response format', () => gplay.permissions({ appId: 'air.tv.ingames.cubematch.free', short: true }) .then((results) => { assert(results.length); results.map(assert.isString); }));
it('should return even if app have no common permissions', () => gplay.permissions({ appId: 'com.skybornegames.battlepop' }) .then((results) => { assert(results.length); results.forEach((perm) => { assert.isString(perm.permission); assert.isString(perm.type); }); }));
it('should return empty if app have no common permissions and short option is passed', () => gplay.permissions({ appId: 'com.skybornegames.battlepop', short: true }) .then((results) => { assert.equal(0, results.length); }));});
google_play_scraper

Version Info

Tagged at
9 months ago