BREAKING CHANGE(core): switch to esm
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
import * as smartlog from '@pushrocks/smartlog';
|
||||
|
||||
export {
|
||||
smartlog
|
||||
}
|
||||
export { smartlog };
|
||||
|
12
test/test.ts
12
test/test.ts
@ -1,18 +1,18 @@
|
||||
import * as plugins from './plugins';
|
||||
import * as plugins from './plugins.js';
|
||||
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as smartmetrics from '../ts/index';
|
||||
import * as smartmetrics from '../ts/index.js';
|
||||
|
||||
let testSmartMetrics: smartmetrics.SmartMetrics;
|
||||
|
||||
tap.test('should create a smartmetrics instance', async () => {
|
||||
const logger = new plugins.smartlog.Smartlog({
|
||||
logContext: null,
|
||||
minimumLogLevel: 'silly'
|
||||
minimumLogLevel: 'silly',
|
||||
});
|
||||
logger.enableConsole();
|
||||
testSmartMetrics = new smartmetrics.SmartMetrics(logger, 'testContainer');
|
||||
expect(testSmartMetrics).to.be.instanceOf(smartmetrics.SmartMetrics);
|
||||
expect(testSmartMetrics).toBeInstanceOf(smartmetrics.SmartMetrics);
|
||||
});
|
||||
|
||||
tap.test('should start smartmetrics', async () => {
|
||||
@ -20,8 +20,8 @@ tap.test('should start smartmetrics', async () => {
|
||||
});
|
||||
|
||||
tap.test('should produce valid metrics', async (tools) => {
|
||||
console.log('calling .getMetrics from Testfile:')
|
||||
console.log('calling .getMetrics from Testfile:');
|
||||
console.log(await testSmartMetrics.getMetrics());
|
||||
})
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
Reference in New Issue
Block a user