Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zamiell committed Nov 28, 2023
1 parent 3324740 commit f92d043
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions test/types/pino.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ pino({ name: "my-logger" }, destinationViaOptionsObject);

try {
throw new Error('Some error')
} catch (err) {
} catch (err: any) {
log.error(err)
}

Expand All @@ -265,16 +265,6 @@ interface StrictShape {
err?: unknown;
}

// The following generic parameter is no longer supported:

/*
info<StrictShape>({
activity: "Required property",
});
*/

// Instead, the `satisfies` operator should be used like you would with any other TypeScript code, like in the below example.

info({
activity: "Required property",
} satisfies StrictShape);
Expand Down Expand Up @@ -311,7 +301,6 @@ const customBaseLogger: CustomBaseLogger = {

// custom levels
const log3 = pino({ customLevels: { myLevel: 100 } })
// @ts-expect-error We intentionally cause a run-time error here.
expectError(log3.log())
log3.level = 'myLevel'
log3.myLevel('')
Expand Down

0 comments on commit f92d043

Please sign in to comment.