Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ovx committed Feb 11, 2024
1 parent f8f343d commit 93202fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ server.on('request', async (req, res) => {
const path = getPath(req.url || '/');

res.on('close', () => {
inspector.instruments.measurements.trackResponse({
inspector.instruments.metrics.trackResponse({
status: res.statusCode,
duration: performance.now() - start,
});
Expand Down
12 changes: 12 additions & 0 deletions tests/inspector.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { describe, expect, it } from 'vitest';
import { Inspector } from '../lib/index.js';
import { MemoryStore } from '../lib/store.js';

describe('Inspector', () => {
it('should create a new instance', () => {
const inspector = new Inspector({
store: new MemoryStore(),
});
expect(inspector).toBeInstanceOf(Inspector);
});
});

0 comments on commit 93202fd

Please sign in to comment.