diff --git a/.eslintrc.js b/.eslintrc.js index 07591b79..3cc9c629 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,13 +1,37 @@ -module.exports = { - "extends": "airbnb-base", - env: { - node: true - }, - rules: { - // Tweak rules set by airbnb config - 'no-console': 'off', // allow console - 'import/no-extraneous-dependencies': ["error", {"optionalDependencies": true}], // Allow optional dep import - // Warn unresolved imports ie: idb-connector import will be unresolved when on non IBM i system. - 'import/no-unresolved': ['off', { commonjs: true }], +module.exports = { + extends: 'airbnb-base', + plugins: [ + 'mocha', + ], + env: { + node: true, + }, + rules: { + // Tweak rules set by airbnb config + // We need to allow use of console.log for verbose mode + 'no-console': 'off', + }, + overrides: [ + { + files: ['test/**/*.js'], + env: { + node: true, + mocha: true, + }, + extends: 'plugin:mocha/recommended', + rules: { + // These are set by airbnb-base, but go against Mocha conventions + // See https://mochajs.org/#arrow-functions + // and https://github.com/airbnb/javascript/issues/433 + 'func-names': 'off', + 'prefer-arrow-callback': 'off', + + // The following rules cause problems for our existing tests, so they are disabled for now: + 'mocha/no-mocha-arrows': 'off', + 'mocha/no-skipped-tests': 'off', + 'mocha/no-hooks-for-single-case': 'off', + 'mocha/no-identical-title': 'off', }, + }, + ], }; diff --git a/lib/transports/idbTransport.js b/lib/transports/idbTransport.js index 502be3f3..979fec24 100644 --- a/lib/transports/idbTransport.js +++ b/lib/transports/idbTransport.js @@ -18,7 +18,10 @@ const idbCall = (config, xmlInput, cb) => { const { dbconn, dbstmt, IN, CLOB, CHAR, SQL_ATTR_DBC_SYS_NAMING, SQL_FALSE, - // eslint-disable-next-line global-require + // idb-connector is an optional dependency, since users may not use this transport + // thus we can't globally require it + // eslint-disable-next-line max-len + // eslint-disable-next-line global-require, import/no-extraneous-dependencies, import/no-unresolved } = require('idb-connector'); const { diff --git a/lib/transports/odbcTransport.js b/lib/transports/odbcTransport.js index 46684a9d..b5592727 100644 --- a/lib/transports/odbcTransport.js +++ b/lib/transports/odbcTransport.js @@ -16,7 +16,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. function odbcCall(config, xmlInput, done) { - // eslint-disable-next-line global-require + // odbc is an optional dependency, since users may not use this transport + // eslint-disable-next-line global-require, import/no-extraneous-dependencies const odbc = require('odbc'); const { diff --git a/lib/transports/sshTransport.js b/lib/transports/sshTransport.js index 8c7fb3f2..243e264e 100644 --- a/lib/transports/sshTransport.js +++ b/lib/transports/sshTransport.js @@ -16,7 +16,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. function sshCall(config, xmlIn, done) { - // eslint-disable-next-line global-require + // ssh2 is an optional dependency, since users may not use this transport + // eslint-disable-next-line global-require, import/no-extraneous-dependencies const { Client } = require('ssh2'); const { diff --git a/package-lock.json b/package-lock.json index 67f52363..ae4ef1da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1112,6 +1112,27 @@ } } }, + "eslint-plugin-mocha": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-7.0.1.tgz", + "integrity": "sha512-zkQRW9UigRaayGm/pK9TD5RjccKXSgQksNtpsXbG9b6L5I+jNx7m98VUbZ4w1H1ArlNA+K7IOH+z8TscN6sOYg==", + "dev": true, + "requires": { + "eslint-utils": "^2.0.0", + "ramda": "^0.27.0" + }, + "dependencies": { + "eslint-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", + "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + } + } + }, "eslint-scope": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", @@ -3354,6 +3375,12 @@ "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", "dev": true }, + "ramda": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.0.tgz", + "integrity": "sha512-pVzZdDpWwWqEVVLshWUHjNwuVP7SfcmPraYuqocJp1yo2U1R7P+5QAfDhdItkuoGqIBnBYrtPp7rEPqDn9HlZA==", + "dev": true + }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", diff --git a/package.json b/package.json index 5dcedbac..f96080a1 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "eslint": "^6.2.0", "eslint-config-airbnb-base": "^14.0.0", "eslint-plugin-import": "^2.18.2", + "eslint-plugin-mocha": "^7.0.1", "mocha": "^6.2.3", "sinon": "^7.4.1", "standard-version": "^7.0.0" diff --git a/test/functional/CommandCallFunctional.js b/test/functional/CommandCallFunctional.js index e82a4acd..0b977157 100644 --- a/test/functional/CommandCallFunctional.js +++ b/test/functional/CommandCallFunctional.js @@ -15,8 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ - const { expect } = require('chai'); const { parseString } = require('xml2js'); const { CommandCall, Connection } = require('../../lib/itoolkit'); diff --git a/test/functional/ProgramCallFunctional.js b/test/functional/ProgramCallFunctional.js index b5c95bf0..a35fa156 100644 --- a/test/functional/ProgramCallFunctional.js +++ b/test/functional/ProgramCallFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ const { expect } = require('chai'); const { parseString } = require('xml2js'); diff --git a/test/functional/checkObjectExists.js b/test/functional/checkObjectExists.js index 6d534b98..c383a7b8 100644 --- a/test/functional/checkObjectExists.js +++ b/test/functional/checkObjectExists.js @@ -3,7 +3,9 @@ const createLib = `CRTLIB LIB(${lib}) TYPE(*TEST) TEXT('Used to test Node.js too const findLib = `SELECT SCHEMA_NAME FROM qsys2.sysschemas WHERE SCHEMA_NAME = '${lib}'`; function checkObjectExistsSSH(config, object = {}, callback) { - /* eslint-disable global-require */ + // ssh2 is an optional dependency, since users may not use this transport + // thus we can't globally require it + // eslint-disable-next-line global-require, import/no-extraneous-dependencies const { Client } = require('ssh2'); const client = new Client(); @@ -68,6 +70,9 @@ function checkObjectExistsSSH(config, object = {}, callback) { } function checkObjectExistsODBC(config, object = {}, callback) { + // odbc is an optional dependency, since users may not use this transport + // thus we can't globally require it + // eslint-disable-next-line global-require, import/no-extraneous-dependencies const odbc = require('odbc'); const connectionString = config.dsn || `DRIVER=IBM i Access ODBC Driver;SYSTEM=${config.host};UID=${config.username};PWD=${config.password};`; @@ -110,6 +115,10 @@ function checkObjectExistsODBC(config, object = {}, callback) { } function checkObjectExistsIDB(config, object = {}, callback) { + // idb-connector is an optional dependency, since users may not use this transport + // thus we can't globally require it + // eslint-disable-next-line max-len + // eslint-disable-next-line global-require, import/no-extraneous-dependencies, import/no-unresolved const { dbconn, dbstmt } = require('idb-connector'); /* eslint-disable new-cap */ diff --git a/test/functional/deprecated/commandsFunctional.js b/test/functional/deprecated/commandsFunctional.js index 82b62bf9..403ec00b 100644 --- a/test/functional/deprecated/commandsFunctional.js +++ b/test/functional/deprecated/commandsFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ diff --git a/test/functional/deprecated/iDataQueueFunctional.js b/test/functional/deprecated/iDataQueueFunctional.js index 4aa3478a..f1ca768a 100644 --- a/test/functional/deprecated/iDataQueueFunctional.js +++ b/test/functional/deprecated/iDataQueueFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/deprecated/iNetworkFunctional.js b/test/functional/deprecated/iNetworkFunctional.js index 245c95af..e24a6ba0 100644 --- a/test/functional/deprecated/iNetworkFunctional.js +++ b/test/functional/deprecated/iNetworkFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/deprecated/iObjFunctional.js b/test/functional/deprecated/iObjFunctional.js index 186738a5..6dfccb51 100644 --- a/test/functional/deprecated/iObjFunctional.js +++ b/test/functional/deprecated/iObjFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/deprecated/iPgmFunctional.js b/test/functional/deprecated/iPgmFunctional.js index ed1effef..eb40a6c3 100644 --- a/test/functional/deprecated/iPgmFunctional.js +++ b/test/functional/deprecated/iPgmFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/deprecated/iProdFunctional.js b/test/functional/deprecated/iProdFunctional.js index 4c63a569..1add9f8c 100644 --- a/test/functional/deprecated/iProdFunctional.js +++ b/test/functional/deprecated/iProdFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/deprecated/iSqlFunctional.js b/test/functional/deprecated/iSqlFunctional.js index 1b1c2052..fcd6f350 100644 --- a/test/functional/deprecated/iSqlFunctional.js +++ b/test/functional/deprecated/iSqlFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ diff --git a/test/functional/deprecated/iUserSpaceFunctional.js b/test/functional/deprecated/iUserSpaceFunctional.js index 7a798332..040122c1 100644 --- a/test/functional/deprecated/iUserSpaceFunctional.js +++ b/test/functional/deprecated/iUserSpaceFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/deprecated/iWorkFunctional.js b/test/functional/deprecated/iWorkFunctional.js index 888535e8..ba3d60db 100644 --- a/test/functional/deprecated/iWorkFunctional.js +++ b/test/functional/deprecated/iWorkFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/iDataQueueFunctional.js b/test/functional/iDataQueueFunctional.js index b0e7cd4a..b50dc217 100644 --- a/test/functional/iDataQueueFunctional.js +++ b/test/functional/iDataQueueFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/iNetworkFunctional.js b/test/functional/iNetworkFunctional.js index 95de68fc..55657e7d 100644 --- a/test/functional/iNetworkFunctional.js +++ b/test/functional/iNetworkFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/iObjFunctional.js b/test/functional/iObjFunctional.js index a9cc64db..bf6b8ae7 100644 --- a/test/functional/iObjFunctional.js +++ b/test/functional/iObjFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/iProdFunctional.js b/test/functional/iProdFunctional.js index b0a8d186..853e2703 100644 --- a/test/functional/iProdFunctional.js +++ b/test/functional/iProdFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/iSqlFunctional.js b/test/functional/iSqlFunctional.js index b6136920..c442a75d 100644 --- a/test/functional/iSqlFunctional.js +++ b/test/functional/iSqlFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/iUserSpaceFunctional.js b/test/functional/iUserSpaceFunctional.js index 501fe55f..37fc7787 100644 --- a/test/functional/iUserSpaceFunctional.js +++ b/test/functional/iUserSpaceFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/functional/iWorkFunctional.js b/test/functional/iWorkFunctional.js index a69c67f9..9fbcb74b 100644 --- a/test/functional/iWorkFunctional.js +++ b/test/functional/iWorkFunctional.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/unit/CommandCallUnit.js b/test/unit/CommandCallUnit.js index b131c947..5c33272a 100644 --- a/test/unit/CommandCallUnit.js +++ b/test/unit/CommandCallUnit.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ const { expect } = require('chai'); const { CommandCall } = require('../../lib/itoolkit'); diff --git a/test/unit/ConnectionUnit.js b/test/unit/ConnectionUnit.js index 2cb2b55e..21489838 100644 --- a/test/unit/ConnectionUnit.js +++ b/test/unit/ConnectionUnit.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/unit/ProgamCallUnit.js b/test/unit/ProgamCallUnit.js index 5551b7f3..7bdc08a9 100644 --- a/test/unit/ProgamCallUnit.js +++ b/test/unit/ProgamCallUnit.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/unit/deprecated/iConnUnit.js b/test/unit/deprecated/iConnUnit.js index 96fd0b72..d6882a6f 100644 --- a/test/unit/deprecated/iConnUnit.js +++ b/test/unit/deprecated/iConnUnit.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/unit/deprecated/iPgmUnit.js b/test/unit/deprecated/iPgmUnit.js index 7e7f9f13..98bcb724 100644 --- a/test/unit/deprecated/iPgmUnit.js +++ b/test/unit/deprecated/iPgmUnit.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/unit/deprecated/iSqlUnit.js b/test/unit/deprecated/iSqlUnit.js index e5bf1a01..8c013b8b 100644 --- a/test/unit/deprecated/iSqlUnit.js +++ b/test/unit/deprecated/iSqlUnit.js @@ -15,7 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ /* eslint-disable new-cap */ const { expect } = require('chai'); diff --git a/test/unit/deprecated/xmlToJsonUnit.js b/test/unit/deprecated/xmlToJsonUnit.js index 4ebb98e7..2d487be6 100644 --- a/test/unit/deprecated/xmlToJsonUnit.js +++ b/test/unit/deprecated/xmlToJsonUnit.js @@ -15,8 +15,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-env mocha */ - const { expect } = require('chai'); const { xmlToJson } = require('../../../lib/itoolkit');