@webex/internal-plugin-device 2.59.2 → 2.59.3-next.1

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.
Files changed (41) hide show
  1. package/.eslintrc.js +6 -6
  2. package/README.md +80 -80
  3. package/babel.config.js +3 -3
  4. package/dist/config.js +27 -27
  5. package/dist/config.js.map +1 -1
  6. package/dist/constants.js.map +1 -1
  7. package/dist/device.js +226 -226
  8. package/dist/device.js.map +1 -1
  9. package/dist/features/feature-collection.js +14 -14
  10. package/dist/features/feature-collection.js.map +1 -1
  11. package/dist/features/feature-model.js +73 -73
  12. package/dist/features/feature-model.js.map +1 -1
  13. package/dist/features/features-model.js +28 -28
  14. package/dist/features/features-model.js.map +1 -1
  15. package/dist/features/index.js.map +1 -1
  16. package/dist/index.js +4 -4
  17. package/dist/index.js.map +1 -1
  18. package/dist/interceptors/device-url.js +8 -8
  19. package/dist/interceptors/device-url.js.map +1 -1
  20. package/dist/metrics.js.map +1 -1
  21. package/jest.config.js +3 -3
  22. package/package.json +17 -16
  23. package/process +1 -1
  24. package/src/config.js +60 -60
  25. package/src/constants.js +23 -23
  26. package/src/device.js +835 -835
  27. package/src/features/feature-collection.js +30 -30
  28. package/src/features/feature-model.js +189 -189
  29. package/src/features/features-model.js +96 -96
  30. package/src/features/index.js +5 -5
  31. package/src/index.js +29 -29
  32. package/src/interceptors/device-url.js +61 -61
  33. package/src/metrics.js +5 -5
  34. package/test/integration/spec/device.js +904 -904
  35. package/test/integration/spec/webex.js +42 -42
  36. package/test/unit/spec/device.js +409 -409
  37. package/test/unit/spec/features/feature-collection.js +24 -24
  38. package/test/unit/spec/features/feature-model.js +255 -255
  39. package/test/unit/spec/features/features-model.js +97 -97
  40. package/test/unit/spec/interceptors/device-url.js +215 -215
  41. package/test/unit/spec/wdm-dto.json +104 -104
@@ -1,42 +1,42 @@
1
- import '@webex/internal-plugin-device';
2
-
3
- import {assert} from '@webex/test-helper-chai';
4
- import sinon from 'sinon';
5
- import WebexCore from '@webex/webex-core';
6
- import testUsers from '@webex/test-helper-test-users';
7
-
8
- describe('plugin-device', () => {
9
- describe('Webex', () => {
10
- let device;
11
- let user;
12
- let webex;
13
-
14
- before('create users', () =>
15
- testUsers.create({count: 1}).then(([createdUser]) => {
16
- user = createdUser;
17
- })
18
- );
19
-
20
- beforeEach('create webex instance', () => {
21
- webex = new WebexCore({
22
- credentials: user.token,
23
- });
24
-
25
- device = webex.internal.device;
26
-
27
- return device.register();
28
- });
29
-
30
- describe('#onBeforeLogout()', () => {
31
- beforeEach('setup spy', () => {
32
- sinon.spy(device, 'unregister');
33
- });
34
-
35
- it('unregisters the device', () =>
36
- webex.logout({noRedirect: true}).then(() => {
37
- assert.called(device.unregister);
38
- assert.isFalse(device.registered);
39
- }));
40
- });
41
- });
42
- });
1
+ import '@webex/internal-plugin-device';
2
+
3
+ import {assert} from '@webex/test-helper-chai';
4
+ import sinon from 'sinon';
5
+ import WebexCore from '@webex/webex-core';
6
+ import testUsers from '@webex/test-helper-test-users';
7
+
8
+ describe('plugin-device', () => {
9
+ describe('Webex', () => {
10
+ let device;
11
+ let user;
12
+ let webex;
13
+
14
+ before('create users', () =>
15
+ testUsers.create({count: 1}).then(([createdUser]) => {
16
+ user = createdUser;
17
+ })
18
+ );
19
+
20
+ beforeEach('create webex instance', () => {
21
+ webex = new WebexCore({
22
+ credentials: user.token,
23
+ });
24
+
25
+ device = webex.internal.device;
26
+
27
+ return device.register();
28
+ });
29
+
30
+ describe('#onBeforeLogout()', () => {
31
+ beforeEach('setup spy', () => {
32
+ sinon.spy(device, 'unregister');
33
+ });
34
+
35
+ it('unregisters the device', () =>
36
+ webex.logout({noRedirect: true}).then(() => {
37
+ assert.called(device.unregister);
38
+ assert.isFalse(device.registered);
39
+ }));
40
+ });
41
+ });
42
+ });