@webex/test-helper-chai 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.
package/.eslintrc.js CHANGED
@@ -1,6 +1,6 @@
1
- const config = {
2
- root: true,
3
- extends: ['@webex/eslint-config-legacy'],
4
- };
5
-
6
- module.exports = config;
1
+ const config = {
2
+ root: true,
3
+ extends: ['@webex/eslint-config-legacy'],
4
+ };
5
+
6
+ module.exports = config;
package/README.md CHANGED
@@ -1,31 +1,31 @@
1
- # @webex/test-helper-chai
2
-
3
- [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
4
-
5
- >
6
-
7
- - [Install](#install)
8
- - [Usage](#usage)
9
- - [Contribute](#contribute)
10
- - [Maintainers](#maintainers)
11
- - [License](#license)
12
-
13
- ## Install
14
-
15
- ```bash
16
- npm install --save @webex/test-helper-chai
17
- ```
18
-
19
- ## Usage
20
-
21
- ## Maintainers
22
-
23
- This package is maintained by [Cisco Webex for Developers](https://developer.webex.com/).
24
-
25
- ## Contribute
26
-
27
- Pull requests welcome. Please see [CONTRIBUTING.md](https://github.com/webex/webex-js-sdk/blob/master/CONTRIBUTING.md) for more details.
28
-
29
- ## License
30
-
31
- © 2016-2020 Cisco and/or its affiliates. All Rights Reserved.
1
+ # @webex/test-helper-chai
2
+
3
+ [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
4
+
5
+ >
6
+
7
+ - [Install](#install)
8
+ - [Usage](#usage)
9
+ - [Contribute](#contribute)
10
+ - [Maintainers](#maintainers)
11
+ - [License](#license)
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ npm install --save @webex/test-helper-chai
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ## Maintainers
22
+
23
+ This package is maintained by [Cisco Webex for Developers](https://developer.webex.com/).
24
+
25
+ ## Contribute
26
+
27
+ Pull requests welcome. Please see [CONTRIBUTING.md](https://github.com/webex/webex-js-sdk/blob/master/CONTRIBUTING.md) for more details.
28
+
29
+ ## License
30
+
31
+ © 2016-2020 Cisco and/or its affiliates. All Rights Reserved.
package/babel.config.js CHANGED
@@ -1,3 +1,3 @@
1
- const babelConfigLegacy = require('@webex/babel-config-legacy');
2
-
3
- module.exports = babelConfigLegacy;
1
+ const babelConfigLegacy = require('@webex/babel-config-legacy');
2
+
3
+ module.exports = babelConfigLegacy;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
- /*!
4
- * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
+ /*!
4
+ * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
5
5
  */
6
6
 
7
7
  /* eslint-disable no-invalid-this */
@@ -11,9 +11,9 @@ var file = require('@webex/test-helper-file');
11
11
  var schemas = require('./schemas');
12
12
  var primitives = require('./primitives');
13
13
 
14
- /**
15
- * @param {Object} chai
16
- * @returns {undefined}
14
+ /**
15
+ * @param {Object} chai
16
+ * @returns {undefined}
17
17
  */
18
18
  module.exports = function registerAssertions(chai) {
19
19
  var Assertion = chai.Assertion;
@@ -1 +1 @@
1
- {"version":3,"names":["checkError","require","file","schemas","primitives","module","exports","registerAssertions","chai","Assertion","addMethod","expectedRejection","errorLike","errMsgMatcher","msg","assert","flag","util","promise","then","_obj","actual","toString","onReject","reason","Error","compatibleInstance","compatibleConstructor","getConstructorName","placeholder","RegExp","compatibleMessage","concat","getMessage","isRejected","to","be","rejectedWith","expectStatusCode","statusCode","assertStatusCode","obj","have","addProperty","blobLike","isBlobLike","bufferLike","isBufferLike","isNotBlobLike","not","isNotBufferLike"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint-disable no-invalid-this */\n\nconst checkError = require('check-error');\nconst file = require('@webex/test-helper-file');\n\nconst schemas = require('./schemas');\nconst primitives = require('./primitives');\n\n/**\n * @param {Object} chai\n * @returns {undefined}\n */\nmodule.exports = function registerAssertions(chai) {\n const {Assertion} = chai;\n\n // The follow assertion is adapted from chai-as-promised as that library is no\n // longer compatible with IE 11\n Assertion.addMethod('rejectedWith', function expectedRejection(errorLike, errMsgMatcher, msg) {\n const {assert} = chai;\n const {flag} = chai.util;\n\n if (msg) {\n flag(this, 'message', msg);\n }\n\n const promise = this.then ? this : this._obj;\n\n return promise.then(\n (actual) => {\n assert(\n false,\n 'expected #{this} to be rejected but it was fulfilled with #{act}',\n null,\n errorLike && errorLike.toString(),\n actual\n );\n\n return actual;\n },\n // complexity is result of basic ternaries\n // eslint-disable-next-line complexity\n function onReject(reason) {\n if (errorLike) {\n if (errorLike instanceof Error) {\n if (!checkError.compatibleInstance(reason, errorLike)) {\n this.assert(\n false,\n 'expected #{this} to be rejected with #{exp} but was rejected with #{act}',\n null,\n errorLike.toString(),\n reason.toString()\n );\n }\n }\n\n if (!checkError.compatibleConstructor(reason, errorLike)) {\n this.assert(\n false,\n 'expected #{this} to be rejected with #{exp} but was rejected with #{act}',\n null,\n errorLike instanceof Error\n ? errorLike.toString()\n : errorLike && checkError.getConstructorName(errorLike),\n reason instanceof Error\n ? reason.toString()\n : reason && checkError.getConstructorName(reason)\n );\n }\n }\n\n if (reason && errMsgMatcher) {\n let placeholder = 'including';\n\n if (errMsgMatcher instanceof RegExp) {\n placeholder = 'matching';\n }\n\n if (!checkError.compatibleMessage(reason, errMsgMatcher)) {\n this.assert(\n false,\n `expected #{this} to be be rejected with error ${placeholder} #{exp} but got #{act}`,\n null,\n errMsgMatcher,\n checkError.getMessage(reason)\n );\n }\n }\n\n return reason;\n }\n );\n });\n\n chai.assert.isRejected = function isRejected(promise, errorLike, errMsgMatcher, msg) {\n if (typeof errorLike === 'string' || errorLike instanceof RegExp) {\n errMsgMatcher = errorLike;\n errorLike = null;\n }\n\n return new Assertion(promise, msg, chai.assert.isRejected, true).to.be.rejectedWith(\n errorLike,\n errMsgMatcher\n );\n };\n\n /* eslint no-unused-expressions: [0] */\n\n Assertion.addMethod('statusCode', function expectStatusCode(statusCode) {\n this.assert(\n (this._obj.statusCode || this._obj) === statusCode,\n `expected #{this} to have an HTTP Status Code of ${statusCode}`,\n `expected #{this} to not have an HTTP Status Code of ${statusCode}`\n );\n });\n\n chai.assert.statusCode = function assertStatusCode(obj, statusCode, msg) {\n new Assertion(obj, msg).to.have.statusCode(statusCode);\n };\n\n Assertion.addProperty('blobLike', function blobLike() {\n this.assert(\n file.isBlobLike(this._obj),\n 'expected #{this} to be a Buffer (nodejs) or Blob (browser)',\n 'expected #{this} not to be a Buffer (nodejs) or Blob (browser)'\n );\n });\n\n Assertion.addProperty('bufferLike', function bufferLike() {\n this.assert(\n file.isBufferLike(this._obj),\n 'expected #{this} to be a Buffer (nodejs) or ArrayBuffer (browser)',\n 'expected #{this} not to be a Buffer (nodejs) or ArrayBuffer (browser)'\n );\n });\n\n chai.assert.isBlobLike = function isBlobLike(obj, msg) {\n new Assertion(obj, msg).to.be.blobLike;\n };\n\n chai.assert.isNotBlobLike = function isNotBlobLike(obj, msg) {\n new Assertion(obj, msg).not.to.be.blobLike;\n };\n\n chai.assert.isBufferLike = function isBufferLike(obj, msg) {\n new Assertion(obj, msg).to.be.bufferLike;\n };\n\n chai.assert.isNotBufferLike = function isNotBufferLike(obj, msg) {\n new Assertion(obj, msg).not.to.be.bufferLike;\n };\n\n primitives(chai);\n schemas(chai);\n};\n"],"mappings":";;AAAA;AACA;AACA;;AAEA;;AAEA,IAAMA,UAAU,GAAGC,OAAO,CAAC,aAAa,CAAC;AACzC,IAAMC,IAAI,GAAGD,OAAO,CAAC,yBAAyB,CAAC;AAE/C,IAAME,OAAO,GAAGF,OAAO,CAAC,WAAW,CAAC;AACpC,IAAMG,UAAU,GAAGH,OAAO,CAAC,cAAc,CAAC;;AAE1C;AACA;AACA;AACA;AACAI,MAAM,CAACC,OAAO,GAAG,SAASC,kBAAkBA,C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EAAE3B,GAAG,CAAC,CAACqB,EAAE,CAACC,EAAE,CAACU,UAAU;EAC1C,CAAC;EAEDtC,IAAI,CAACO,MAAM,CAACmC,eAAe,GAAG,SAASA,eAAeA,CAACT,GAAG,EAAE3B,GAAG,EAAE;IAC/D,IAAIL,SAAS,CAACgC,GAAG,EAAE3B,GAAG,CAAC,CAACmC,GAAG,CAACd,EAAE,CAACC,EAAE,CAACU,UAAU;EAC9C,CAAC;EAED1C,UAAU,CAACI,IAAI,CAAC;EAChBL,OAAO,CAACK,IAAI,CAAC;AACf,CAAC"}
1
+ {"version":3,"names":["checkError","require","file","schemas","primitives","module","exports","registerAssertions","chai","Assertion","addMethod","expectedRejection","errorLike","errMsgMatcher","msg","assert","flag","util","promise","then","_obj","actual","toString","onReject","reason","Error","compatibleInstance","compatibleConstructor","getConstructorName","placeholder","RegExp","compatibleMessage","concat","getMessage","isRejected","to","be","rejectedWith","expectStatusCode","statusCode","assertStatusCode","obj","have","addProperty","blobLike","isBlobLike","bufferLike","isBufferLike","isNotBlobLike","not","isNotBufferLike"],"sources":["index.js"],"sourcesContent":["/*!\r\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\r\n */\r\n\r\n/* eslint-disable no-invalid-this */\r\n\r\nconst checkError = require('check-error');\r\nconst file = require('@webex/test-helper-file');\r\n\r\nconst schemas = require('./schemas');\r\nconst primitives = require('./primitives');\r\n\r\n/**\r\n * @param {Object} chai\r\n * @returns {undefined}\r\n */\r\nmodule.exports = function registerAssertions(chai) {\r\n const {Assertion} = chai;\r\n\r\n // The follow assertion is adapted from chai-as-promised as that library is no\r\n // longer compatible with IE 11\r\n Assertion.addMethod('rejectedWith', function expectedRejection(errorLike, errMsgMatcher, msg) {\r\n const {assert} = chai;\r\n const {flag} = chai.util;\r\n\r\n if (msg) {\r\n flag(this, 'message', msg);\r\n }\r\n\r\n const promise = this.then ? this : this._obj;\r\n\r\n return promise.then(\r\n (actual) => {\r\n assert(\r\n false,\r\n 'expected #{this} to be rejected but it was fulfilled with #{act}',\r\n null,\r\n errorLike && errorLike.toString(),\r\n actual\r\n );\r\n\r\n return actual;\r\n },\r\n // complexity is result of basic ternaries\r\n // eslint-disable-next-line complexity\r\n function onReject(reason) {\r\n if (errorLike) {\r\n if (errorLike instanceof Error) {\r\n if (!checkError.compatibleInstance(reason, errorLike)) {\r\n this.assert(\r\n false,\r\n 'expected #{this} to be rejected with #{exp} but was rejected with #{act}',\r\n null,\r\n errorLike.toString(),\r\n reason.toString()\r\n );\r\n }\r\n }\r\n\r\n if (!checkError.compatibleConstructor(reason, errorLike)) {\r\n this.assert(\r\n false,\r\n 'expected #{this} to be rejected with #{exp} but was rejected with #{act}',\r\n null,\r\n errorLike instanceof Error\r\n ? errorLike.toString()\r\n : errorLike && checkError.getConstructorName(errorLike),\r\n reason instanceof Error\r\n ? reason.toString()\r\n : reason && checkError.getConstructorName(reason)\r\n );\r\n }\r\n }\r\n\r\n if (reason && errMsgMatcher) {\r\n let placeholder = 'including';\r\n\r\n if (errMsgMatcher instanceof RegExp) {\r\n placeholder = 'matching';\r\n }\r\n\r\n if (!checkError.compatibleMessage(reason, errMsgMatcher)) {\r\n this.assert(\r\n false,\r\n `expected #{this} to be be rejected with error ${placeholder} #{exp} but got #{act}`,\r\n null,\r\n errMsgMatcher,\r\n checkError.getMessage(reason)\r\n );\r\n }\r\n }\r\n\r\n return reason;\r\n }\r\n );\r\n });\r\n\r\n chai.assert.isRejected = function isRejected(promise, errorLike, errMsgMatcher, msg) {\r\n if (typeof errorLike === 'string' || errorLike instanceof RegExp) {\r\n errMsgMatcher = errorLike;\r\n errorLike = null;\r\n }\r\n\r\n return new Assertion(promise, msg, chai.assert.isRejected, true).to.be.rejectedWith(\r\n errorLike,\r\n errMsgMatcher\r\n );\r\n };\r\n\r\n /* eslint no-unused-expressions: [0] */\r\n\r\n Assertion.addMethod('statusCode', function expectStatusCode(statusCode) {\r\n this.assert(\r\n (this._obj.statusCode || this._obj) === statusCode,\r\n `expected #{this} to have an HTTP Status Code of ${statusCode}`,\r\n `expected #{this} to not have an HTTP Status Code of ${statusCode}`\r\n );\r\n });\r\n\r\n chai.assert.statusCode = function assertStatusCode(obj, statusCode, msg) {\r\n new Assertion(obj, msg).to.have.statusCode(statusCode);\r\n };\r\n\r\n Assertion.addProperty('blobLike', function blobLike() {\r\n this.assert(\r\n file.isBlobLike(this._obj),\r\n 'expected #{this} to be a Buffer (nodejs) or Blob (browser)',\r\n 'expected #{this} not to be a Buffer (nodejs) or Blob (browser)'\r\n );\r\n });\r\n\r\n Assertion.addProperty('bufferLike', function bufferLike() {\r\n this.assert(\r\n file.isBufferLike(this._obj),\r\n 'expected #{this} to be a Buffer (nodejs) or ArrayBuffer (browser)',\r\n 'expected #{this} not to be a Buffer (nodejs) or ArrayBuffer (browser)'\r\n );\r\n });\r\n\r\n chai.assert.isBlobLike = function isBlobLike(obj, msg) {\r\n new Assertion(obj, msg).to.be.blobLike;\r\n };\r\n\r\n chai.assert.isNotBlobLike = function isNotBlobLike(obj, msg) {\r\n new Assertion(obj, msg).not.to.be.blobLike;\r\n };\r\n\r\n chai.assert.isBufferLike = function isBufferLike(obj, msg) {\r\n new Assertion(obj, msg).to.be.bufferLike;\r\n };\r\n\r\n chai.assert.isNotBufferLike = function isNotBufferLike(obj, msg) {\r\n new Assertion(obj, msg).not.to.be.bufferLike;\r\n };\r\n\r\n primitives(chai);\r\n schemas(chai);\r\n};\r\n"],"mappings":";;AAAA;AACA;AACA;;AAEA;;AAEA,IAAMA,UAAU,GAAGC,OAAO,CAAC,aAAa,CAAC;AACzC,IAAMC,IAAI,GAAGD,OAAO,CAAC,yBAAyB,CAAC;AAE/C,IAAME,OAAO,GAAGF,OAAO,CAAC,WAAW,CAAC;AACpC,IAAMG,UAAU,GAAGH,OAAO,CAAC,cAAc,CAAC;;AAE1C;AACA;AACA;AACA;AACAI,MAAM,CAACC,OAAO,GAAG,SAASC,kBAAkBA,CAACC,IAAI,EAAE;EACjD,IAAOC,S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E,CAACC,EAAE,CAACU,UAAU;EAC1C,CAAC;EAEDtC,IAAI,CAACO,MAAM,CAACmC,eAAe,GAAG,SAASA,eAAeA,CAACT,GAAG,EAAE3B,GAAG,EAAE;IAC/D,IAAIL,SAAS,CAACgC,GAAG,EAAE3B,GAAG,CAAC,CAACmC,GAAG,CAACd,EAAE,CAACC,EAAE,CAACU,UAAU;EAC9C,CAAC;EAED1C,UAAU,CAACI,IAAI,CAAC;EAChBL,OAAO,CAACK,IAAI,CAAC;AACf,CAAC"}
@@ -3,8 +3,8 @@
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
4
4
  var _parseInt2 = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/parse-int"));
5
5
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
6
- /*!
7
- * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
6
+ /*!
7
+ * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
8
8
  */
9
9
 
10
10
  /* eslint-disable no-invalid-this */
@@ -12,9 +12,9 @@ var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/objec
12
12
 
13
13
  var shouldToAssert = require('./should-to-assert');
14
14
 
15
- /**
16
- * @param {Object} chai
17
- * @returns {undefined}
15
+ /**
16
+ * @param {Object} chai
17
+ * @returns {undefined}
18
18
  */
19
19
  module.exports = function (chai) {
20
20
  var Assertion = chai.Assertion,
@@ -1 +1 @@
1
- {"version":3,"names":["shouldToAssert","require","module","exports","chai","Assertion","assert","uuidPattern","emailPattern","addProperty","isString","_obj","notMatch","match","isNotNumber","notEqual","_parseInt2","default","toString","addMethod","properties","_this","forEach","property","obj","msg","to","have","_this2","deepEqual","_keys","sort","strictProperties","hydraId","uuid","email","isoDate"],"sources":["primitives.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint-disable no-invalid-this */\n/* eslint-disable func-names */\n\nconst shouldToAssert = require('./should-to-assert');\n\n/**\n * @param {Object} chai\n * @returns {undefined}\n */\nmodule.exports = function (chai) {\n const {Assertion, assert} = chai;\n\n /* eslint no-unused-expressions: [0] */\n\n const uuidPattern = /^[a-f\\d]{8}(?:-[a-f\\d]{4}){3}-[a-f\\d]{12}$/;\n const emailPattern = /^[^\\s]+?@[^\\s]+?$/;\n\n Assertion.addProperty('hydraId', function () {\n assert.isString(this._obj);\n assert.notMatch(this._obj, uuidPattern);\n });\n\n Assertion.addProperty('uuid', function () {\n assert.isString(this._obj);\n assert.match(this._obj, uuidPattern);\n });\n\n Assertion.addProperty('email', function () {\n assert.isString(this._obj);\n assert.match(this._obj, emailPattern);\n });\n\n Assertion.addProperty('isoDate', function () {\n assert.isString(this._obj);\n assert.isNotNumber(this._obj);\n assert.notEqual(parseInt(this._obj, 10).toString(), this._obj);\n });\n\n Assertion.addMethod('properties', function (properties) {\n properties.forEach((property) => {\n assert.property(this._obj, property);\n });\n });\n\n chai.assert.properties = function (obj, properties, msg) {\n new Assertion(obj, msg).to.have.properties(properties);\n };\n\n Assertion.addMethod('strictProperties', function (properties) {\n properties.forEach((property) => {\n assert.property(this._obj, property);\n });\n\n assert.deepEqual(Object.keys(this._obj).sort(), properties.sort());\n });\n\n chai.assert.strictProperties = function (obj, properties, msg) {\n new Assertion(obj, msg).to.have.strictProperties(properties);\n };\n\n shouldToAssert(chai, {\n hydraId: 'isHydraID',\n uuid: 'isUUID',\n email: 'isEmail',\n isoDate: 'isISODate',\n });\n};\n"],"mappings":";;;;;AAAA;AACA;AACA;;AAEA;AACA;;AAEA,IAAMA,cAAc,GAAGC,OAAO,CAAC,oBAAoB,CAAC;;AAEpD;AACA;AACA;AACA;AACAC,MAAM,CAACC,OAAO,GAAG,UAAUC,IAAI,EAAE;EAC/B,IAAOC,SAAS,GAAYD,IAAI,CAAzBC,SAAS;IAAEC,MAAM,GAAIF,IAAI,CAAdE,MAAM;;EAExB;;EAEA,IAAMC,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CAACE,MAAM,CAACc,UAAU,GAAG,UAAUI,GAAG,EAAEJ,UAAU,EAAEK,GAAG,EAAE;IACvD,IAAIpB,SAAS,CAACmB,GAAG,EAAEC,GAAG,CAAC,CAACC,EAAE,CAACC,IAAI,CAACP,UAAU,CAACA,UAAU,CAAC;EACxD,CAAC;EAEDf,SAAS,CAACc,SAAS,CAAC,kBAAkB,EAAE,UAAUC,UAAU,EAAE;IAAA,IAAAQ,MAAA;IAC5DR,UAAU,CAACE,OAAO,CAAC,UAACC,QAAQ,EAAK;MAC/BjB,MAAM,CAACiB,QAAQ,CAACK,MAAI,CAACjB,IAAI,EAAEY,QAAQ,CAAC;IACtC,CAAC,CAAC;IAEFjB,MAAM,CAACuB,SAAS,CAAC,IAAAC,KAAA,CAAAb,OAAA,EAAY,IAAI,CAACN,IAAI,CAAC,CAACoB,IAAI,EAAE,EAAEX,UAAU,CAACW,IAAI,EAAE,CAAC;EACpE,CAAC,CAAC;EAEF3B,IAAI,CAACE,MAAM,CAAC0B,gBAAgB,GAAG,UAAUR,GAAG,EAAEJ,UAAU,EAAEK,GAAG,EAAE;IAC7D,IAAIpB,SAAS,CAACmB,GAAG,EAAEC,GAAG,CAAC,CAACC,EAAE,CAACC,IAAI,CAACK,gBAAgB,CAACZ,UAAU,CAAC;EAC9D,CAAC;EAEDpB,cAAc,CAACI,IAAI,EAAE;IACnB6B,OAAO,EAAE,WAAW;IACpBC,IAAI,EAAE,QAAQ;IACdC,KAAK,EAAE,SAAS;IAChBC,OAAO,EAAE;EACX,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"names":["shouldToAssert","require","module","exports","chai","Assertion","assert","uuidPattern","emailPattern","addProperty","isString","_obj","notMatch","match","isNotNumber","notEqual","_parseInt2","default","toString","addMethod","properties","_this","forEach","property","obj","msg","to","have","_this2","deepEqual","_keys","sort","strictProperties","hydraId","uuid","email","isoDate"],"sources":["primitives.js"],"sourcesContent":["/*!\r\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\r\n */\r\n\r\n/* eslint-disable no-invalid-this */\r\n/* eslint-disable func-names */\r\n\r\nconst shouldToAssert = require('./should-to-assert');\r\n\r\n/**\r\n * @param {Object} chai\r\n * @returns {undefined}\r\n */\r\nmodule.exports = function (chai) {\r\n const {Assertion, assert} = chai;\r\n\r\n /* eslint no-unused-expressions: [0] */\r\n\r\n const uuidPattern = /^[a-f\\d]{8}(?:-[a-f\\d]{4}){3}-[a-f\\d]{12}$/;\r\n const emailPattern = /^[^\\s]+?@[^\\s]+?$/;\r\n\r\n Assertion.addProperty('hydraId', function () {\r\n assert.isString(this._obj);\r\n assert.notMatch(this._obj, uuidPattern);\r\n });\r\n\r\n Assertion.addProperty('uuid', function () {\r\n assert.isString(this._obj);\r\n assert.match(this._obj, uuidPattern);\r\n });\r\n\r\n Assertion.addProperty('email', function () {\r\n assert.isString(this._obj);\r\n assert.match(this._obj, emailPattern);\r\n });\r\n\r\n Assertion.addProperty('isoDate', function () {\r\n assert.isString(this._obj);\r\n assert.isNotNumber(this._obj);\r\n assert.notEqual(parseInt(this._obj, 10).toString(), this._obj);\r\n });\r\n\r\n Assertion.addMethod('properties', function (properties) {\r\n properties.forEach((property) => {\r\n assert.property(this._obj, property);\r\n });\r\n });\r\n\r\n chai.assert.properties = function (obj, properties, msg) {\r\n new Assertion(obj, msg).to.have.properties(properties);\r\n };\r\n\r\n Assertion.addMethod('strictProperties', function (properties) {\r\n properties.forEach((property) => {\r\n assert.property(this._obj, property);\r\n });\r\n\r\n assert.deepEqual(Object.keys(this._obj).sort(), properties.sort());\r\n });\r\n\r\n chai.assert.strictProperties = function (obj, properties, msg) {\r\n new Assertion(obj, msg).to.have.strictProperties(properties);\r\n };\r\n\r\n shouldToAssert(chai, {\r\n hydraId: 'isHydraID',\r\n uuid: 'isUUID',\r\n email: 'isEmail',\r\n isoDate: 'isISODate',\r\n });\r\n};\r\n"],"mappings":";;;;;AAAA;AACA;AACA;;AAEA;AACA;;AAEA,IAAMA,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 
3
- /*!
4
- * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
+ /*!
4
+ * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
5
5
  */
6
6
 
7
7
  /* eslint-disable no-invalid-this */
@@ -9,9 +9,9 @@
9
9
 
10
10
  var shouldToAssert = require('./should-to-assert');
11
11
 
12
- /**
13
- * @param {Object} chai
14
- * @returns {undefined}
12
+ /**
13
+ * @param {Object} chai
14
+ * @returns {undefined}
15
15
  */
16
16
  module.exports = function schemas(chai) {
17
17
  var Assertion = chai.Assertion,
@@ -1 +1 @@
1
- {"version":3,"names":["shouldToAssert","require","module","exports","schemas","chai","Assertion","assert","addProperty","properties","_obj","equal","objectType","property","scr","isDefined","notEqual","displayName","encryptedDisplayName","summary","encryptedSummary","isConversation","include","tags","notInclude","ok","includes","isObject","kmsMessage","status","isHydraID","id","roomId","personId","isEmail","personEmail","isISODate","created","isString","files","isArray","isAbove","length","forEach","file","isMessageFile","text","emails","email","familyName","givenName","title","name","teamId","isRoom","resource","event","filter","targetUrl"],"sources":["schemas.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint-disable no-invalid-this */\n/* eslint-disable func-names */\n\nconst shouldToAssert = require('./should-to-assert');\n\n/**\n * @param {Object} chai\n * @returns {undefined}\n */\nmodule.exports = function schemas(chai) {\n const {Assertion, assert} = chai;\n\n /* eslint no-unused-expressions: [0] */\n\n Assertion.addProperty('AccessToken', function () {\n assert.properties(this._obj, [\n 'access_token',\n 'token_type',\n 'expires',\n 'expires_in',\n 'refresh_token',\n 'refresh_token_expires',\n 'refresh_token_expires_in',\n ]);\n });\n\n Assertion.addProperty('Activity', function () {\n assert.properties(this._obj, ['url', 'id', 'object', 'actor']);\n\n assert.equal(this._obj.objectType, 'activity');\n });\n\n Assertion.addProperty('FileItem', function () {\n assert.property(this._obj, 'displayName', 'The file has a display name');\n assert.property(this._obj, 'scr', 'The file has an scr');\n assert.property(this._obj.scr, 'loc', \"The file's scr has an loc\");\n });\n\n Assertion.addProperty('ThumbnailItem', function () {\n assert.property(this._obj, 'scr', 'The thumbnail has an scr');\n assert.property(this._obj.scr, 'loc', \"The thumbnail's scr has an loc\");\n assert.property(this._obj, 'height', 'The thumbnail has a width');\n assert.property(this._obj, 'width', 'The thumbnail has a width');\n });\n\n Assertion.addProperty('Conversation', function () {\n assert.equal(this._obj.objectType, 'conversation');\n assert.property(this._obj, 'id');\n assert.property(this._obj, 'url');\n });\n\n Assertion.addProperty('MachineAccount', function () {\n assert.isDefined(this._obj, 'orgId');\n assert.property(this._obj, 'orgId');\n assert.isDefined(this._obj, 'name');\n assert.property(this._obj, 'name');\n assert.isDefined(this._obj, 'password');\n assert.property(this._obj, 'password');\n assert.isDefined(this._obj, 'email');\n assert.property(this._obj, 'email');\n assert.isDefined(this._obj, 'description');\n assert.property(this._obj, 'description');\n });\n\n Assertion.addProperty('InternalTeam', function () {\n assert.equal(this._obj.objectType, 'team');\n assert.property(this._obj, 'id');\n assert.property(this._obj, 'url');\n assert.property(this._obj, 'generalConversationUuid');\n\n assert.property(this._obj, 'encryptedDisplayName');\n assert.property(this._obj, 'displayName');\n assert.notEqual(this._obj.displayName, this._obj.encryptedDisplayName);\n\n if (this._obj.summary) {\n assert.property(this._obj, 'encryptedSummary');\n assert.notEqual(this._obj.summary, this._obj.encryptedSummary);\n }\n });\n\n Assertion.addProperty('OneOnOneConversation', function () {\n assert.isConversation(this._obj);\n assert.include(this._obj.tags, 'ONE_ON_ONE');\n });\n\n Assertion.addProperty('GroupConversation', function () {\n assert.isConversation(this._obj);\n assert.notInclude(this._obj.tags, 'ONE_ON_ONE');\n });\n\n Assertion.addProperty('InternalTeamConversation', function () {\n assert.isConversation(this._obj);\n assert.property(this._obj, 'team');\n\n assert.ok(\n this._obj.tags.includes('OPEN') || this._obj.tags.includes('TEAM'),\n 'Conversation must have `OPEN` or `TEAM` tag'\n );\n\n assert.property(this._obj, 'encryptedDisplayName');\n assert.property(this._obj, 'displayName');\n assert.notEqual(this._obj.displayName, this._obj.encryptedDisplayName);\n });\n\n Assertion.addProperty('NewEncryptedConversation', function () {\n assert.property(this._obj, 'kmsMessage');\n assert.isObject(this._obj.kmsMessage);\n assert.equal(this._obj.kmsMessage.status, 201);\n assert.property(this._obj, 'defaultActivityEncryptionKeyUrl');\n assert.property(this._obj, 'kmsResourceObjectUrl');\n });\n\n Assertion.addProperty('NewEncryptedInternalTeam', function () {\n assert.property(this._obj, 'kmsMessage');\n assert.isObject(this._obj.kmsMessage);\n assert.equal(this._obj.kmsMessage.status, 201);\n assert.property(this._obj, 'defaultActivityEncryptionKeyUrl');\n // This should be identical to NewEncryptedConversation, but it seems there\n // was an api change at some point\n // assert.property(this._obj, 'kmsResourceObjectUrl');\n });\n\n Assertion.addProperty('EncryptedActivity', function () {\n assert.property(this._obj, 'encryptionKeyUrl');\n });\n\n Assertion.addProperty('Membership', function () {\n assert.properties(this._obj, [\n 'id',\n 'roomId',\n 'personId',\n 'personEmail',\n 'isModerator',\n 'isMonitor',\n 'created',\n ]);\n\n assert.isHydraID(this._obj.id);\n assert.isHydraID(this._obj.roomId);\n assert.isHydraID(this._obj.personId);\n assert.isEmail(this._obj.personEmail);\n assert.isISODate(this._obj.created);\n });\n\n Assertion.addProperty('Message', function () {\n assert.properties(this._obj, ['id', 'personId', 'personEmail', 'roomId', 'created']);\n\n assert.isString(this._obj.id);\n assert.isHydraID(this._obj.personId);\n assert.isEmail(this._obj.personEmail);\n assert.isISODate(this._obj.created);\n assert.isHydraID(this._obj.roomId);\n\n if (this._obj.files) {\n assert.isArray(this._obj.files);\n assert.isAbove(this._obj.files.length, 0);\n this._obj.files.forEach((file) => {\n assert.isMessageFile(file);\n });\n }\n\n if (this._obj.text) {\n assert.isString(this._obj.text);\n assert.isAbove(this._obj.text.length, 0);\n }\n });\n\n Assertion.addProperty('MessageFile', function () {\n assert.isString(this._obj);\n });\n\n Assertion.addProperty('Person', function () {\n assert.properties(this._obj, ['id', 'emails', 'created']);\n\n assert.isHydraID(this._obj.id);\n assert.isArray(this._obj.emails);\n this._obj.emails.forEach((email) => {\n assert.isEmail(email);\n });\n assert.isISODate(this._obj.created);\n\n if (this._obj.familyName) {\n assert.isString(this._obj.familyName);\n }\n\n if (this._obj.givenName) {\n assert.isString(this._obj.givenName);\n }\n });\n\n Assertion.addProperty('Room', function () {\n assert.properties(this._obj, ['id', 'title', 'created']);\n\n assert.isHydraID(this._obj.id);\n assert.isString(this._obj.title);\n assert.isISODate(this._obj.created);\n });\n\n Assertion.addProperty('Team', function () {\n assert.properties(this._obj, ['id', 'name', 'created']);\n\n assert.isHydraID(this._obj.id);\n assert.isString(this._obj.name);\n assert.isISODate(this._obj.created);\n });\n\n Assertion.addProperty('TeamMembership', function () {\n assert.properties(this._obj, [\n 'id',\n 'teamId',\n 'personId',\n 'personEmail',\n 'isModerator',\n 'created',\n ]);\n\n assert.isHydraID(this._obj.id);\n assert.isHydraID(this._obj.teamId);\n assert.isHydraID(this._obj.personId);\n assert.isEmail(this._obj.personEmail);\n\n assert.isISODate(this._obj.created);\n });\n\n Assertion.addProperty('TeamRoom', function () {\n assert.isRoom(this._obj);\n assert.property(this._obj, 'teamId');\n });\n\n Assertion.addProperty('Webhook', function () {\n assert.properties(this._obj, ['id', 'resource', 'event', 'filter', 'targetUrl', 'name']);\n\n assert.isHydraID(this._obj.id);\n assert.isString(this._obj.resource);\n assert.isString(this._obj.event);\n assert.isString(this._obj.filter);\n assert.isString(this._obj.targetUrl);\n assert.isString(this._obj.name);\n\n // waiting on completion of COLLAB-159\n // assert.isISODate(this._obj.created);\n });\n\n shouldToAssert(chai, [\n 'AccessToken',\n 'Activity',\n 'Conversation',\n 'InternalTeam',\n 'FileItem',\n 'ThumbnailItem',\n 'OneOnOneConversation',\n 'GroupConversation',\n 'InternalTeamConversation',\n 'NewEncryptedConversation',\n 'NewEncryptedInternalTeam',\n 'EncryptedActivity',\n 'MachineAccount',\n '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ACE,UAAU,CAAC,IAAI,CAACC,IAAI,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAExFH,MAAM,CAACuB,SAAS,CAAC,IAAI,CAACpB,IAAI,CAACqB,EAAE,CAAC;IAC9BxB,MAAM,CAAC+B,QAAQ,CAAC,IAAI,CAAC5B,IAAI,CAAC6C,QAAQ,CAAC;IACnChD,MAAM,CAAC+B,QAAQ,CAAC,IAAI,CAAC5B,IAAI,CAAC8C,KAAK,CAAC;IAChCjD,MAAM,CAAC+B,QAAQ,CAAC,IAAI,CAAC5B,IAAI,CAAC+C,MAAM,CAAC;IACjClD,MAAM,CAAC+B,QAAQ,CAAC,IAAI,CAAC5B,IAAI,CAACgD,SAAS,CAAC;IACpCnD,MAAM,CAAC+B,QAAQ,CAAC,IAAI,CAAC5B,IAAI,CAAC0C,IAAI,CAAC;;IAE/B;IACA;EACF,CAAC,CAAC;;EAEFpD,cAAc,CAACK,IAAI,EAAE,CACnB,aAAa,EACb,UAAU,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,aAAa,EACb,QAAQ,EACR,MAAM,EACN,MAAM,EACN,gBAAgB,EAChB,UAAU,EACV,SAAS,CACV,CAAC;AACJ,CAAC"}
1
+ {"version":3,"names":["shouldToAssert","require","module","exports","schemas","chai","Assertion","assert","addProperty","properties","_obj","equal","objectType","property","scr","isDefined","notEqual","displayName","encryptedDisplayName","summary","encryptedSummary","isConversation","include","tags","notInclude","ok","includes","isObject","kmsMessage","status","isHydraID","id","roomId","personId","isEmail","personEmail","isISODate","created","isString","files","isArray","isAbove","length","forEach","file","isMessageFile","text","emails","email","familyName","givenName","title","name","teamId","isRoom","resource","event","filter","targetUrl"],"sources":["schemas.js"],"sourcesContent":["/*!\r\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\r\n */\r\n\r\n/* eslint-disable no-invalid-this */\r\n/* eslint-disable func-names */\r\n\r\nconst shouldToAssert = require('./should-to-assert');\r\n\r\n/**\r\n * @param {Object} chai\r\n * @returns {undefined}\r\n */\r\nmodule.exports = function schemas(chai) {\r\n const {Assertion, assert} = chai;\r\n\r\n /* eslint no-unused-expressions: [0] */\r\n\r\n Assertion.addProperty('AccessToken', function () {\r\n assert.properties(this._obj, [\r\n 'access_token',\r\n 'token_type',\r\n 'expires',\r\n 'expires_in',\r\n 'refresh_token',\r\n 'refresh_token_expires',\r\n 'refresh_token_expires_in',\r\n ]);\r\n });\r\n\r\n Assertion.addProperty('Activity', function () {\r\n assert.properties(this._obj, ['url', 'id', 'object', 'actor']);\r\n\r\n assert.equal(this._obj.objectType, 'activity');\r\n });\r\n\r\n Assertion.addProperty('FileItem', function () {\r\n assert.property(this._obj, 'displayName', 'The file has a display name');\r\n assert.property(this._obj, 'scr', 'The file has an scr');\r\n assert.property(this._obj.scr, 'loc', \"The file's scr has an loc\");\r\n });\r\n\r\n Assertion.addProperty('ThumbnailItem', function () {\r\n assert.property(this._obj, 'scr', 'The thumbnail has an scr');\r\n assert.property(this._obj.scr, 'loc', \"The thumbnail's scr has an loc\");\r\n assert.property(this._obj, 'height', 'The thumbnail has a width');\r\n assert.property(this._obj, 'width', 'The thumbnail has a width');\r\n });\r\n\r\n Assertion.addProperty('Conversation', function () {\r\n assert.equal(this._obj.objectType, 'conversation');\r\n assert.property(this._obj, 'id');\r\n assert.property(this._obj, 'url');\r\n });\r\n\r\n Assertion.addProperty('MachineAccount', function () {\r\n assert.isDefined(this._obj, 'orgId');\r\n assert.property(this._obj, 'orgId');\r\n assert.isDefined(this._obj, 'name');\r\n assert.property(this._obj, 'name');\r\n assert.isDefined(this._obj, 'password');\r\n assert.property(this._obj, 'password');\r\n assert.isDefined(this._obj, 'email');\r\n assert.property(this._obj, 'email');\r\n assert.isDefined(this._obj, 'description');\r\n assert.property(this._obj, 'description');\r\n });\r\n\r\n Assertion.addProperty('InternalTeam', function () {\r\n assert.equal(this._obj.objectType, 'team');\r\n assert.property(this._obj, 'id');\r\n assert.property(this._obj, 'url');\r\n assert.property(this._obj, 'generalConversationUuid');\r\n\r\n assert.property(this._obj, 'encryptedDisplayName');\r\n assert.property(this._obj, 'displayName');\r\n assert.notEqual(this._obj.displayName, this._obj.encryptedDisplayName);\r\n\r\n if (this._obj.summary) {\r\n assert.property(this._obj, 'encryptedSummary');\r\n assert.notEqual(this._obj.summary, this._obj.encryptedSummary);\r\n }\r\n });\r\n\r\n Assertion.addProperty('OneOnOneConversation', function () {\r\n assert.isConversation(this._obj);\r\n assert.include(this._obj.tags, 'ONE_ON_ONE');\r\n });\r\n\r\n Assertion.addProperty('GroupConversation', function () {\r\n assert.isConversation(this._obj);\r\n assert.notInclude(this._obj.tags, 'ONE_ON_ONE');\r\n });\r\n\r\n Assertion.addProperty('InternalTeamConversation', function () {\r\n assert.isConversation(this._obj);\r\n assert.property(this._obj, 'team');\r\n\r\n assert.ok(\r\n this._obj.tags.includes('OPEN') || this._obj.tags.includes('TEAM'),\r\n 'Conversation must have `OPEN` or `TEAM` tag'\r\n );\r\n\r\n assert.property(this._obj, 'encryptedDisplayName');\r\n assert.property(this._obj, 'displayName');\r\n assert.notEqual(this._obj.displayName, this._obj.encryptedDisplayName);\r\n });\r\n\r\n Assertion.addProperty('NewEncryptedConversation', function () {\r\n assert.property(this._obj, 'kmsMessage');\r\n assert.isObject(this._obj.kmsMessage);\r\n assert.equal(this._obj.kmsMessage.status, 201);\r\n assert.property(this._obj, 'defaultActivityEncryptionKeyUrl');\r\n assert.property(this._obj, 'kmsResourceObjectUrl');\r\n });\r\n\r\n Assertion.addProperty('NewEncryptedInternalTeam', function () {\r\n assert.property(this._obj, 'kmsMessage');\r\n assert.isObject(this._obj.kmsMessage);\r\n assert.equal(this._obj.kmsMessage.status, 201);\r\n assert.property(this._obj, 'defaultActivityEncryptionKeyUrl');\r\n // This should be identical to NewEncryptedConversation, but it seems there\r\n // was an api change at some point\r\n // assert.property(this._obj, 'kmsResourceObjectUrl');\r\n });\r\n\r\n Assertion.addProperty('EncryptedActivity', function () {\r\n assert.property(this._obj, 'encryptionKeyUrl');\r\n });\r\n\r\n Assertion.addProperty('Membership', function () {\r\n assert.properties(this._obj, [\r\n 'id',\r\n 'roomId',\r\n 'personId',\r\n 'personEmail',\r\n 'isModerator',\r\n 'isMonitor',\r\n 'created',\r\n ]);\r\n\r\n assert.isHydraID(this._obj.id);\r\n assert.isHydraID(this._obj.roomId);\r\n assert.isHydraID(this._obj.personId);\r\n assert.isEmail(this._obj.personEmail);\r\n assert.isISODate(this._obj.created);\r\n });\r\n\r\n Assertion.addProperty('Message', function () {\r\n assert.properties(this._obj, ['id', 'personId', 'personEmail', 'roomId', 'created']);\r\n\r\n assert.isString(this._obj.id);\r\n assert.isHydraID(this._obj.personId);\r\n assert.isEmail(this._obj.personEmail);\r\n assert.isISODate(this._obj.created);\r\n assert.isHydraID(this._obj.roomId);\r\n\r\n if (this._obj.files) {\r\n assert.isArray(this._obj.files);\r\n assert.isAbove(this._obj.files.length, 0);\r\n this._obj.files.forEach((file) => {\r\n assert.isMessageFile(file);\r\n });\r\n }\r\n\r\n if (this._obj.text) {\r\n assert.isString(this._obj.text);\r\n assert.isAbove(this._obj.text.length, 0);\r\n }\r\n });\r\n\r\n Assertion.addProperty('MessageFile', function () {\r\n assert.isString(this._obj);\r\n });\r\n\r\n Assertion.addProperty('Person', function () {\r\n assert.properties(this._obj, ['id', 'emails', 'created']);\r\n\r\n assert.isHydraID(this._obj.id);\r\n assert.isArray(this._obj.emails);\r\n this._obj.emails.forEach((email) => {\r\n assert.isEmail(email);\r\n });\r\n assert.isISODate(this._obj.created);\r\n\r\n if (this._obj.familyName) {\r\n assert.isString(this._obj.familyName);\r\n }\r\n\r\n if (this._obj.givenName) {\r\n assert.isString(this._obj.givenName);\r\n }\r\n });\r\n\r\n Assertion.addProperty('Room', function () {\r\n assert.properties(this._obj, ['id', 'title', 'created']);\r\n\r\n assert.isHydraID(this._obj.id);\r\n assert.isString(this._obj.title);\r\n assert.isISODate(this._obj.created);\r\n });\r\n\r\n Assertion.addProperty('Team', function () {\r\n assert.properties(this._obj, ['id', 'name', 'created']);\r\n\r\n assert.isHydraID(this._obj.id);\r\n assert.isString(this._obj.name);\r\n assert.isISODate(this._obj.created);\r\n });\r\n\r\n Assertion.addProperty('TeamMembership', function () {\r\n assert.properties(this._obj, [\r\n 'id',\r\n 'teamId',\r\n 'personId',\r\n 'personEmail',\r\n 'isModerator',\r\n 'created',\r\n ]);\r\n\r\n assert.isHydraID(this._obj.id);\r\n assert.isHydraID(this._obj.teamId);\r\n assert.isHydraID(this._obj.personId);\r\n assert.isEmail(this._obj.personEmail);\r\n\r\n assert.isISODate(this._obj.created);\r\n });\r\n\r\n Assertion.addProperty('TeamRoom', function () {\r\n assert.isRoom(this._obj);\r\n assert.property(this._obj, 'teamId');\r\n });\r\n\r\n Assertion.addProperty('Webhook', function () {\r\n assert.properties(this._obj, ['id', 'resource', 'event', 'filter', 'targetUrl', 'name']);\r\n\r\n assert.isHydraID(this._obj.id);\r\n assert.isString(this._obj.resource);\r\n assert.isString(this._obj.event);\r\n assert.isString(this._obj.filter);\r\n assert.isString(this._obj.targetUrl);\r\n assert.isString(this._obj.name);\r\n\r\n // waiting on completion of COLLAB-159\r\n // assert.isISODate(this._obj.created);\r\n });\r\n\r\n shouldToAssert(chai, [\r\n 'AccessToken',\r\n 'Activity',\r\n 'Conversation',\r\n 'InternalTeam',\r\n 'FileItem',\r\n 'ThumbnailItem',\r\n 'OneOnOneConversation',\r\n 'GroupConversation',\r\n 'InternalTeamConversation',\r\n 'NewEncryptedConversation',\r\n 'NewEncryptedInternalTeam',\r\n 'EncryptedActivity',\r\n 'MachineAccount',\r\n 'Membership',\r\n 'Message',\r\n 'MessageFile',\r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AU,CAAC,IAAI,CAACC,IAAI,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAExFH,MAAM,CAACuB,SAAS,CAAC,IAAI,CAACpB,IAAI,CAACqB,EAAE,CAAC;IAC9BxB,MAAM,CAAC+B,QAAQ,CAAC,IAAI,CAAC5B,IAAI,CAAC6C,QAAQ,CAAC;IACnChD,MAAM,CAAC+B,QAAQ,CAAC,IAAI,CAAC5B,IAAI,CAAC8C,KAAK,CAAC;IAChCjD,MAAM,CAAC+B,QAAQ,CAAC,IAAI,CAAC5B,IAAI,CAAC+C,MAAM,CAAC;IACjClD,MAAM,CAAC+B,QAAQ,CAAC,IAAI,CAAC5B,IAAI,CAACgD,SAAS,CAAC;IACpCnD,MAAM,CAAC+B,QAAQ,CAAC,IAAI,CAAC5B,IAAI,CAAC0C,IAAI,CAAC;;IAE/B;IACA;EACF,CAAC,CAAC;;EAEFpD,cAAc,CAACK,IAAI,EAAE,CACnB,aAAa,EACb,UAAU,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,aAAa,EACb,QAAQ,EACR,MAAM,EACN,MAAM,EACN,gBAAgB,EAChB,UAAU,EACV,SAAS,CACV,CAAC;AACJ,CAAC"}
@@ -2,22 +2,22 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
4
4
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
5
- /*!
6
- * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
5
+ /*!
6
+ * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
7
7
  */
8
8
 
9
9
  var _require = require('lodash'),
10
10
  isArray = _require.isArray,
11
11
  camelCase = _require.camelCase;
12
12
 
13
- /**
14
- * Converts expect/should assertion definitions into assert definitions
15
- * @param {Object} chai
16
- * @param {Object|Array} names if an Object, keys are should assertions and
17
- * values are assert assertions; if an array, values are should assertions and
18
- * assert assertions are computed by capitalizing the first letter and
19
- * prepending "is".
20
- * @returns {undefined}
13
+ /**
14
+ * Converts expect/should assertion definitions into assert definitions
15
+ * @param {Object} chai
16
+ * @param {Object|Array} names if an Object, keys are should assertions and
17
+ * values are assert assertions; if an array, values are should assertions and
18
+ * assert assertions are computed by capitalizing the first letter and
19
+ * prepending "is".
20
+ * @returns {undefined}
21
21
  */
22
22
  module.exports = function shouldToAssert(chai, names) {
23
23
  var Assertion = chai.Assertion;
@@ -30,10 +30,10 @@ module.exports = function shouldToAssert(chai, names) {
30
30
  };
31
31
  });
32
32
 
33
- /**
34
- * @private
35
- * @param {string} key
36
- * @returns {string}
33
+ /**
34
+ * @private
35
+ * @param {string} key
36
+ * @returns {string}
37
37
  */
38
38
  function computeAssertionName(key) {
39
39
  var name = names[key];
@@ -1 +1 @@
1
- {"version":3,"names":["_require","require","isArray","camelCase","module","exports","shouldToAssert","chai","names","Assertion","keys","_keys","default","forEach","key","assert","computeAssertionName","obj","msg","to","be","a","name","concat"],"sources":["should-to-assert.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nconst {isArray, camelCase} = require('lodash');\n\n/**\n * Converts expect/should assertion definitions into assert definitions\n * @param {Object} chai\n * @param {Object|Array} names if an Object, keys are should assertions and\n * values are assert assertions; if an array, values are should assertions and\n * assert assertions are computed by capitalizing the first letter and\n * prepending \"is\".\n * @returns {undefined}\n */\nmodule.exports = function shouldToAssert(chai, names) {\n const {Assertion} = chai;\n /* eslint no-unused-expressions: [0] */\n\n const keys = isArray(names) ? names : Object.keys(names);\n\n keys.forEach((key) => {\n chai.assert[computeAssertionName(key)] = (obj, msg) => {\n new Assertion(obj, msg).to.be.a[key];\n };\n });\n\n /**\n * @private\n * @param {string} key\n * @returns {string}\n */\n function computeAssertionName(key) {\n const name = names[key];\n\n if (name) {\n return name;\n }\n\n return camelCase(`is_${key}`);\n }\n};\n"],"mappings":";;;;AAAA;AACA;AACA;;AAEA,IAAAA,QAAA,GAA6BC,OAAO,CAAC,QAAQ,CAAC;EAAvCC,OAAO,GAAAF,QAAA,CAAPE,OAAO;EAAEC,SAAS,GAAAH,QAAA,CAATG,SAAS;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAC,MAAM,CAACC,OAAO,GAAG,SAASC,cAAcA,CAACC,IAAI,EAAEC,KAAK,EAAE;EACpD,IAAOC,SAAS,GAAIF,IAAI,CAAjBE,SAAS;EAChB;;EAEA,IAAMC,IAAI,GAAGR,OAAO,CAACM,KAAK,CAAC,GAAGA,KAAK,GAAG,IAAAG,KAAA,CAAAC,OAAA,EAAYJ,KAAK,CAAC;EAExDE,IAAI,CAACG,OAAO,CAAC,UAACC,GAAG,EAAK;IACpBP,IAAI,CAACQ,MAAM,CAACC,oBAAoB,CAACF,GAAG,CAAC,CAAC,GAAG,UAACG,GAAG,EAAEC,GAAG,EAAK;MACrD,IAAIT,SAAS,CAACQ,GAAG,EAAEC,GAAG,CAAC,CAACC,EAAE,CAACC,EAAE,CAACC,CAAC,CAACP,GAAG,CAAC;IACtC,CAAC;EACH,CAAC,CAAC;;EAEF;AACF;AACA;AACA;AACA;EACE,SAASE,oBAAoBA,CAACF,GAAG,EAAE;IACjC,IAAMQ,IAAI,GAAGd,KAAK,CAACM,GAAG,CAAC;IAEvB,IAAIQ,IAAI,EAAE;MACR,OAAOA,IAAI;IACb;IAEA,OAAOnB,SAAS,OAAAoB,MAAA,CAAOT,GAAG,EAAG;EAC/B;AACF,CAAC"}
1
+ {"version":3,"names":["_require","require","isArray","camelCase","module","exports","shouldToAssert","chai","names","Assertion","keys","_keys","default","forEach","key","assert","computeAssertionName","obj","msg","to","be","a","name","concat"],"sources":["should-to-assert.js"],"sourcesContent":["/*!\r\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\r\n */\r\n\r\nconst {isArray, camelCase} = require('lodash');\r\n\r\n/**\r\n * Converts expect/should assertion definitions into assert definitions\r\n * @param {Object} chai\r\n * @param {Object|Array} names if an Object, keys are should assertions and\r\n * values are assert assertions; if an array, values are should assertions and\r\n * assert assertions are computed by capitalizing the first letter and\r\n * prepending \"is\".\r\n * @returns {undefined}\r\n */\r\nmodule.exports = function shouldToAssert(chai, names) {\r\n const {Assertion} = chai;\r\n /* eslint no-unused-expressions: [0] */\r\n\r\n const keys = isArray(names) ? names : Object.keys(names);\r\n\r\n keys.forEach((key) => {\r\n chai.assert[computeAssertionName(key)] = (obj, msg) => {\r\n new Assertion(obj, msg).to.be.a[key];\r\n };\r\n });\r\n\r\n /**\r\n * @private\r\n * @param {string} key\r\n * @returns {string}\r\n */\r\n function computeAssertionName(key) {\r\n const name = names[key];\r\n\r\n if (name) {\r\n return name;\r\n }\r\n\r\n return camelCase(`is_${key}`);\r\n }\r\n};\r\n"],"mappings":";;;;AAAA;AACA;AACA;;AAEA,IAAAA,QAAA,GAA6BC,OAAO,CAAC,QAAQ,CAAC;EAAvCC,OAAO,GAAAF,QAAA,CAAPE,OAAO;EAAEC,SAAS,GAAAH,QAAA,CAATG,SAAS;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAC,MAAM,CAACC,OAAO,GAAG,SAASC,cAAcA,CAACC,IAAI,EAAEC,KAAK,EAAE;EACpD,IAAOC,SAAS,GAAIF,IAAI,CAAjBE,SAAS;EAChB;;EAEA,IAAMC,IAAI,GAAGR,OAAO,CAACM,KAAK,CAAC,GAAGA,KAAK,GAAG,IAAAG,KAAA,CAAAC,OAAA,EAAYJ,KAAK,CAAC;EAExDE,IAAI,CAACG,OAAO,CAAC,UAACC,GAAG,EAAK;IACpBP,IAAI,CAACQ,MAAM,CAACC,oBAAoB,CAACF,GAAG,CAAC,CAAC,GAAG,UAACG,GAAG,EAAEC,GAAG,EAAK;MACrD,IAAIT,SAAS,CAACQ,GAAG,EAAEC,GAAG,CAAC,CAACC,EAAE,CAACC,EAAE,CAACC,CAAC,CAACP,GAAG,CAAC;IACtC,CAAC;EACH,CAAC,CAAC;;EAEF;AACF;AACA;AACA;AACA;EACE,SAASE,oBAAoBA,CAACF,GAAG,EAAE;IACjC,IAAMQ,IAAI,GAAGd,KAAK,CAACM,GAAG,CAAC;IAEvB,IAAIQ,IAAI,EAAE;MACR,OAAOA,IAAI;IACb;IAEA,OAAOnB,SAAS,OAAAoB,MAAA,CAAOT,GAAG,EAAG;EAC/B;AACF,CAAC"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
- /*!
4
- * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
+ /*!
4
+ * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
5
5
  */
6
6
 
7
7
  var chai = require('chai');
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["chai","require","sinon","registerAssertions","use","assert","expose","prefix","module","exports"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nconst chai = require('chai');\nconst sinon = require('sinon');\n\nconst registerAssertions = require('./assertions');\n\nchai.use(registerAssertions);\nsinon.assert.expose(chai.assert, {prefix: ''});\n\nmodule.exports = chai;\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,IAAMA,IAAI,GAAGC,OAAO,CAAC,MAAM,CAAC;AAC5B,IAAMC,KAAK,GAAGD,OAAO,CAAC,OAAO,CAAC;AAE9B,IAAME,kBAAkB,GAAGF,OAAO,CAAC,cAAc,CAAC;AAElDD,IAAI,CAACI,GAAG,CAACD,kBAAkB,CAAC;AAC5BD,KAAK,CAACG,MAAM,CAACC,MAAM,CAACN,IAAI,CAACK,MAAM,EAAE;EAACE,MAAM,EAAE;AAAE,CAAC,CAAC;AAE9CC,MAAM,CAACC,OAAO,GAAGT,IAAI"}
1
+ {"version":3,"names":["chai","require","sinon","registerAssertions","use","assert","expose","prefix","module","exports"],"sources":["index.js"],"sourcesContent":["/*!\r\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\r\n */\r\n\r\nconst chai = require('chai');\r\nconst sinon = require('sinon');\r\n\r\nconst registerAssertions = require('./assertions');\r\n\r\nchai.use(registerAssertions);\r\nsinon.assert.expose(chai.assert, {prefix: ''});\r\n\r\nmodule.exports = chai;\r\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,IAAMA,IAAI,GAAGC,OAAO,CAAC,MAAM,CAAC;AAC5B,IAAMC,KAAK,GAAGD,OAAO,CAAC,OAAO,CAAC;AAE9B,IAAME,kBAAkB,GAAGF,OAAO,CAAC,cAAc,CAAC;AAElDD,IAAI,CAACI,GAAG,CAACD,kBAAkB,CAAC;AAC5BD,KAAK,CAACG,MAAM,CAACC,MAAM,CAACN,IAAI,CAACK,MAAM,EAAE;EAACE,MAAM,EAAE;AAAE,CAAC,CAAC;AAE9CC,MAAM,CAACC,OAAO,GAAGT,IAAI"}
package/jest.config.js CHANGED
@@ -1,3 +1,3 @@
1
- const config = require('@webex/jest-config-legacy');
2
-
3
- module.exports = config;
1
+ const config = require('@webex/jest-config-legacy');
2
+
3
+ module.exports = config;
package/package.json CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "name": "@webex/test-helper-chai",
3
- "version": "2.59.2",
4
3
  "description": "chai extended with webex specific assertions",
5
4
  "license": "MIT",
6
5
  "main": "dist/index.js",
@@ -15,30 +14,32 @@
15
14
  },
16
15
  "devDependencies": {
17
16
  "@babel/core": "^7.17.10",
18
- "@webex/babel-config-legacy": "2.59.2",
19
- "@webex/eslint-config-legacy": "2.59.2",
20
- "@webex/jest-config-legacy": "2.59.2",
21
- "@webex/legacy-tools": "2.59.2",
22
- "@webex/test-helper-mocha": "2.59.2",
23
- "@webex/test-helper-mock-webex": "2.59.2",
24
- "@webex/test-helper-test-users": "2.59.2",
17
+ "@webex/babel-config-legacy": "^0.0.0",
18
+ "@webex/eslint-config-legacy": "^0.0.0",
19
+ "@webex/jest-config-legacy": "^0.0.0",
20
+ "@webex/legacy-tools": "^0.0.0",
21
+ "@webex/test-helper-mocha": "^2.59.3-next.1",
22
+ "@webex/test-helper-mock-webex": "^2.59.3-next.1",
23
+ "@webex/test-helper-test-users": "^2.59.3-next.1",
25
24
  "chai": "^4.3.4",
26
25
  "eslint": "^8.24.0",
27
26
  "prettier": "^2.7.1",
28
27
  "sinon": "^9.2.4"
29
28
  },
30
29
  "dependencies": {
31
- "@webex/test-helper-file": "2.59.2",
30
+ "@webex/test-helper-file": "^2.59.3-next.1",
32
31
  "check-error": "^1.0.2",
33
32
  "lodash": "^4.17.21"
34
33
  },
35
34
  "scripts": {
36
35
  "build": "yarn build:src",
37
36
  "build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
37
+ "deploy:npm": "yarn npm publish",
38
38
  "test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
39
39
  "test:browser": "webex-legacy-tools test --integration --unit --runner karma",
40
40
  "test:integration": "webex-legacy-tools test --integration --runner mocha",
41
41
  "test:style": "eslint ./src/**/*.*",
42
42
  "test:unit": "webex-legacy-tools test --unit --runner jest"
43
- }
44
- }
43
+ },
44
+ "version": "2.59.3-next.1"
45
+ }
package/process CHANGED
@@ -1 +1 @@
1
- module.exports = {browser: true};
1
+ module.exports = {browser: true};