mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
22 lines
666 B
JavaScript
22 lines
666 B
JavaScript
var assert = require('assert');
|
|
var events = require('../lib/events');
|
|
var eventStore = require('../lib/eventStore');
|
|
|
|
describe('EventStore', function () {
|
|
describe('#create()', function () {
|
|
it('should emit event', function (done) {
|
|
eventStore.once(events.featureCreated, function (x) {
|
|
assert(x);
|
|
done();
|
|
}
|
|
);
|
|
eventStore.create({
|
|
'name': 'mail-server.validate-email-addresses',
|
|
'enabled': false,
|
|
'strategy': 'default',
|
|
'description': 'Feature description'
|
|
});
|
|
});
|
|
});
|
|
});
|