mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 12:46:11 +02:00
add reset to pubsub for tests
This commit is contained in:
@@ -52,4 +52,7 @@ module.exports = {
|
||||
removeAllListeners: function (event) {
|
||||
get().removeAllListeners(event);
|
||||
},
|
||||
reset: function () {
|
||||
real = null;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -7,6 +7,12 @@ var db = require('./mocks/databasemock');
|
||||
var pubsub = require('../src/pubsub');
|
||||
|
||||
describe('pubsub', function () {
|
||||
beforeEach(function () {
|
||||
pubsub.reset();
|
||||
});
|
||||
afterEach(function () {
|
||||
pubsub.reset();
|
||||
});
|
||||
it('should use singleHostCluster', function (done) {
|
||||
var oldValue = nconf.get('singleHostCluster');
|
||||
var isCluster = nconf.get('isCluster');
|
||||
|
||||
Reference in New Issue
Block a user