2
0
mirror of synced 2025-01-12 15:14:39 +00:00

29 lines
865 B
JavaScript

describe('perf()', () => {
describe('Trace', () => {
it('start() & stop()', async () => {
const trace = firebase.perf().newTrace('bar');
await trace.start();
await trace.stop();
});
describe('incrementCounter()', () => {
it('accepts a string event', async () => {
const trace = firebase.perf().newTrace('bar');
await trace.start();
await trace.incrementCounter('fooby');
await trace.incrementCounter('fooby');
await trace.incrementCounter('fooby');
await trace.incrementCounter('fooby');
await trace.stop();
});
xit('errors if event is not a string', async () => {
const trace = firebase.perf().newTrace('bar');
await trace.start();
await trace.incrementCounter([1, 2, 3, 4]);
await trace.stop();
});
});
});
});