Skip to content

Commit

Permalink
debug(winston): debug integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
dasfmi committed Nov 4, 2024
1 parent 585c3a9 commit 196baca
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions integration/src/winston.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,27 @@ describe('WinstonTransport', () => {
logger.log({
level: 'info',
message: 'Hello from winston',
callback: (err: Error) => {
console.error("winston failed to send logs", err)
}
});

logger.end()

logger.on('finish', () => {
console.log('All logs have been sent');
})

// Wait for the log to be sent
await new Promise((resolve) => setTimeout(resolve, 1500));

const startTime = new Date(new Date().getTime() - 1000 * 60 * 60 * 24).toISOString();
const endTime = new Date(new Date().getTime() + 1000 * 60 * 60 * 24).toISOString();

// const res = await axiom.datasets.query(`['${datasetName}']`, {
// startTime, endTime, streamingDuration: 'auto', noCache: false,
// });

const res = await axiom.queryLegacy(datasetName, {
resolution: 'auto',
startTime,
endTime,
const res = await axiom.query(`['${datasetName}']`, {
startTime, endTime, streamingDuration: 'auto', noCache: false,
});

expect(res.matches).toHaveLength(1);
});
});

0 comments on commit 196baca

Please sign in to comment.