mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-22 23:02:40 +01:00
Updated plugin to be addProperty Re #132
This commit is contained in:
parent
d21e7f6fb5
commit
5c15438949
@ -8,7 +8,7 @@ const { evaluateJsTemplateLiteral, evaluateJsExpression, createResponseParser }
|
||||
const { expect } = chai;
|
||||
chai.use(function (chai, utils) {
|
||||
// Custom assertion for checking if a variable is JSON
|
||||
chai.Assertion.addMethod('json', function () {
|
||||
chai.Assertion.addProperty('json', function () {
|
||||
const obj = this._obj;
|
||||
const isJson = typeof obj === 'object' && obj !== null && !Array.isArray(obj) && obj.constructor === Object;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user