-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
I've been trying to upgrade from an older version to the latest version. I noticed that the "verifyAndScrub" function is no longer available. Is this intentional, as it is still described in the documentation.
When I run this code:
const path = require("node:path");
const approvals = require("approvals");
const Scrubbers = require('approvals/lib/Scrubbers/Scrubbers').Scrubbers;
const { Subject } = require('./Subject');
const approvalsDirName = path.join(__dirname, 'approvals');
describe('Approval tests', function() {
it('should do something', function() {
const output = Subject.doSomething();
approvals.verifyAndScrub(approvalsDirName, 'doSomething', output, dateScrubber());
});
function dateScrubber() {
const regex = /[a-zA-Z]{3} [a-zA-Z]{3} \d{2} \d{4} \d{2}:\d{2}:\d{2} [a-zA-Z]{3}\+\d{4} \(.*\)/g
return Scrubbers.createReqexScrubber(regex, t => `<date_${t}>`);
}
});I get the following error: TypeError: approvals.verifyAndScrub is not a function
I've included a test project to simulate this. Am I missing something?
Thanks in advance.
Metadata
Metadata
Assignees
Labels
No labels