fix(core): update
This commit is contained in:
5
test/plugins.ts
Normal file
5
test/plugins.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import * as smartlog from '@pushrocks/smartlog';
|
||||
|
||||
export {
|
||||
smartlog
|
||||
}
|
26
test/test.ts
Normal file
26
test/test.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import * as plugins from './plugins';
|
||||
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as smartmetrics from '../ts/index';
|
||||
|
||||
let testSmartMetrics: smartmetrics.SmartMetrics;
|
||||
|
||||
tap.test('should create a smartmetrics instance', async () => {
|
||||
const logger = new plugins.smartlog.Smartlog({
|
||||
logContext: null,
|
||||
minimumLogLevel: 'silly'
|
||||
});
|
||||
logger.enableConsole();
|
||||
testSmartMetrics = new smartmetrics.SmartMetrics(logger, 'testContainer');
|
||||
expect(testSmartMetrics).to.be.instanceOf(smartmetrics.SmartMetrics);
|
||||
});
|
||||
|
||||
tap.test('should start smartmetrics', async () => {
|
||||
testSmartMetrics.start();
|
||||
});
|
||||
|
||||
tap.test('should produce valid metrics', async () => {
|
||||
console.log(await testSmartMetrics.getMetrics());
|
||||
})
|
||||
|
||||
tap.start();
|
Reference in New Issue
Block a user