mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-29 07:34:07 +00:00
Updated plugin to be addProperty Re #132
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user