Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should have the correct metadata', async function() {
const { recordingId, recordingName, persister } = this.polly;
this.polly.record();
await this.fetchRecord();
await persister.persist();
const har = await persister.find(recordingId);
const { _recordingName, creator, entries } = har.log;
const entry = entries[0];
expect(_recordingName).to.equal(recordingName);
expect(creator.name).to.equal('Polly.JS');
expect(creator.version).to.equal(Polly.VERSION);
expect(creator.comment).to.equal(
`${persister.constructor.type}:${persister.constructor.name}`
);
expect(entry).to.be.an('object');
expect(entry._id).to.a('string');
expect(entry._order).to.equal(0);
});