1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/unleash-server/test/eventStoreSpec.js
2020-02-20 08:30:08 +01:00

25 lines
747 B
JavaScript

var assert = require('assert');
var eventType = require('../lib/eventType');
var eventStore = require('../lib/eventStore');
describe('EventStore', function () {
describe('#create()', function () {
it('should emit event', function (done) {
eventStore.once(eventType.featureCreated, function (x) {
assert(x);
done();
}
);
var eventData = {
'name': 'mail-server.validate-email-addresses',
'enabled': false,
'strategy': 'default',
'description': 'Feature description'
};
eventStore.create(eventType.featureCreated,'ole',eventData);
});
});
});