tests: cleanup common variables
This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const async = require('async'),
|
||||
common = require('./common.js'),
|
||||
const common = require('./common.js'),
|
||||
database = require('../database.js'),
|
||||
delay = require('delay'),
|
||||
eventlog = require('../eventlog.js'),
|
||||
@@ -15,22 +14,21 @@ const async = require('async'),
|
||||
notifications = require('../notifications.js');
|
||||
|
||||
describe('Eventlog', function () {
|
||||
before(function (done) {
|
||||
async.series([
|
||||
common.setup,
|
||||
eventlog._clear // domain add events
|
||||
], done);
|
||||
const { setup, cleanup } = common;
|
||||
|
||||
before(setup);
|
||||
after(cleanup);
|
||||
|
||||
let eventId;
|
||||
|
||||
it('clear', async function () {
|
||||
await eventlog._clear();
|
||||
});
|
||||
|
||||
after(common.cleanup);
|
||||
|
||||
var eventId;
|
||||
|
||||
it('add succeeds', async function () {
|
||||
const id = await eventlog.add('some.event', { ip: '1.2.3.4' }, { appId: 'thatapp' });
|
||||
expect(id).to.be.a('string');
|
||||
|
||||
console.log(id);
|
||||
eventId = id;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user