Skip to content

Commit 048c427

Browse files
feat: make verify fn a no-op if not implemented (#74)
1 parent b53d955 commit 048c427

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class Executor {
9595
}
9696

9797
async _verify() {
98-
throw new Error('Not implemented');
98+
// no-op in case not implemented in extenders
9999
}
100100

101101
/**

test/index.test.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,13 @@ describe('index test', () => {
7979
}
8080
));
8181

82-
it('verify returns an error when not overridden', () =>
82+
it('verify does not return an error when not overridden', () =>
8383
instance.verify({}).then(
84-
() => {
85-
throw new Error('Oh no');
84+
message => {
85+
assert.equal(message, undefined);
8686
},
87-
err => {
88-
assert.isOk(err, 'err is null');
89-
assert.equal(err.message, 'Not implemented');
87+
() => {
88+
throw new Error('should not fail');
9089
}
9190
));
9291

0 commit comments

Comments
 (0)