fix(core): update

This commit is contained in:
2022-08-05 12:53:19 +02:00
parent faa5d6d542
commit 83c1e2bb4e
3 changed files with 2 additions and 2 deletions

39
test/test.nonci.ts Normal file
View File

@@ -0,0 +1,39 @@
import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
import * as smartclickhouse from '../ts/index.js';
let testClickhouseDb: smartclickhouse.SmartClickHouseDb;
tap.test('first test', async () => {
testClickhouseDb = new smartclickhouse.SmartClickHouseDb({
url: 'http://localhost:8123',
database: 'test2',
unref: true,
});
});
tap.test('should start the clickhouse db', async () => {
await testClickhouseDb.start(true);
});
tap.test('should create a timedatatable', async (toolsArg) => {
const table = await testClickhouseDb.getTable('analytics');
let i = 0;
while(i < 5000) {
await table.addData({
timestamp: Date.now(),
message: `hello this is a message ${i}`,
wow: 'hey',
deep: {
so: 'hello',
myArray: ['array1', 'array2']
}
});
i++;
console.log(`logged ${i} of 5000 lines.`);
await toolsArg.delayFor(1);
}
});
tap.skip.test('should write something to the clickhouse db', async () => {});
tap.start();