'Cypress - plugin import error - Object.setPropertyOf: expected an object or null, got undefined
In Cypress, I have imported a plugin inside support/index.js
const chai = require('chai')
const chaiResponseValidator = require('chai-openapi-response-validator');
chai.use(chaiResponseValidator('./data.json'));
It triggers an error: > Object.setPrototypeOf: expected an object or null, got undefined
I also tried to workaround the fs error with code like this:
const fs = require('fs');
const data = fs.readFileSync('./data.json', 'utf8');
//const data = require('./data.json');
chai.use(chaiResponseValidator(data));
But it didn't help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

