diff --git a/package.json b/package.json index 73611ad2..f6f94925 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wechatpay-axios-plugin", - "version": "0.8.6", + "version": "0.8.7", "description": "微信支付APIv2及v3 NodeJS SDK,支持CLI模式请求OpenAPI,支持v3证书下载,v2付款码支付、企业付款、退款,企业微信-企业支付-企业红包/向员工付款,v2&v3 Native支付、扫码支付、H5支付、JSAPI/小程序支付、合单支付...", "main": "index.js", "typings": "index.d.ts", @@ -52,7 +52,7 @@ "license": "MIT", "dependencies": { "axios": "^0.21.2", - "xml2js": "^0.4.23" + "xml2js": "^0.5.0" }, "peerDependencies": { "yargs": "^17.1.1" @@ -60,7 +60,7 @@ "devDependencies": { "@babel/core": "^7.14.6", "@babel/eslint-parser": "^7.14.7", - "@types/node": "^16.7.10", + "@types/node": ">= 16.7.10", "eslint": "^7.29.0", "eslint-config-airbnb-base": "^14.2.1", "eslint-plugin-import": "^2.23.4", diff --git a/tests/lib/transformer.test.js b/tests/lib/transformer.test.js index a9b039aa..9cd97680 100644 --- a/tests/lib/transformer.test.js +++ b/tests/lib/transformer.test.js @@ -172,7 +172,9 @@ describe('lib/transformer', () => { it('method `toObject` should returns `{mch_id: \'10000100\'}` while a `10000100` string passed in', () => { /* eslint-disable-next-line camelcase */ - should(Transformer.toObject('10000100')).be.eql({ mch_id: '10000100' }); + should(Transformer.toObject('10000100')).be.eql(Object.assign(Object.create(null), { mch_id: '10000100' })); + /* eslint-disable-next-line camelcase */ + should(JSON.stringify(Transformer.toObject('10000100'))).be.eql(JSON.stringify({ mch_id: '10000100' })); }); it('method `toObject` should returns `null` while a `Buffer.from([])` passed in', () => {