mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
change hook name
This commit is contained in:
@@ -77,7 +77,9 @@ describe('Plugins', function () {
|
|||||||
callback(null, data);
|
callback(null, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins.registerHook('test-plugin-crash', { hook: 'filter:test.crashHook', method: filterMethod });
|
||||||
|
|
||||||
|
plugins.fireHook('filter:test.crashHook', { foo: 1 }, function (err, data) {
|
||||||
assert(err);
|
assert(err);
|
||||||
assert.equal(err.message, 'Cannot set property \'a\' of undefined');
|
assert.equal(err.message, 'Cannot set property \'a\' of undefined');
|
||||||
done();
|
done();
|
||||||
|
|||||||
Reference in New Issue
Block a user