11import assert from 'node:assert/strict' ;
22import { describe , it } from 'node:test' ;
3- import type { AstroLoggerMessage , AstroLoggerDestination } from '../../../dist/core/logger/core.js' ;
3+ import type { AstroLoggerDestination } from '../../../dist/core/logger/core.js' ;
44import { AstroIntegrationLogger , AstroLogger } from '../../../dist/core/logger/core.js' ;
55
66describe ( 'AstroLogger' , ( ) => {
77 function createSpyDestination ( ) {
88 const calls : { method : string } [ ] = [ ] ;
9- const destination : AstroLoggerDestination < AstroLoggerMessage > = {
9+ const destination : AstroLoggerDestination = {
1010 write : ( ) => { } ,
1111 flush : ( ) => {
1212 calls . push ( { method : 'flush' } ) ;
@@ -30,7 +30,7 @@ describe('AstroLogger', () => {
3030 } ) ;
3131
3232 it ( 'does not throw when destination has no flush' , ( ) => {
33- const destination : AstroLoggerDestination < AstroLoggerMessage > = {
33+ const destination : AstroLoggerDestination = {
3434 write : ( ) => { } ,
3535 } ;
3636 const logger = new AstroLogger ( { destination, level : 'info' } ) ;
@@ -51,7 +51,7 @@ describe('AstroLogger', () => {
5151 } ) ;
5252
5353 it ( 'does not throw when destination has no close' , ( ) => {
54- const destination : AstroLoggerDestination < AstroLoggerMessage > = {
54+ const destination : AstroLoggerDestination = {
5555 write : ( ) => { } ,
5656 } ;
5757 const logger = new AstroLogger ( { destination, level : 'info' } ) ;
@@ -63,12 +63,12 @@ describe('AstroLogger', () => {
6363 describe ( 'setDestination' , ( ) => {
6464 it ( 'replaces the destination' , ( ) => {
6565 const writes : string [ ] = [ ] ;
66- const originalDestination : AstroLoggerDestination < AstroLoggerMessage > = {
66+ const originalDestination : AstroLoggerDestination = {
6767 write : ( msg ) => {
6868 writes . push ( 'original:' + msg . message ) ;
6969 } ,
7070 } ;
71- const newDestination : AstroLoggerDestination < AstroLoggerMessage > = {
71+ const newDestination : AstroLoggerDestination = {
7272 write : ( msg ) => {
7373 writes . push ( 'new:' + msg . message ) ;
7474 } ,
@@ -89,7 +89,7 @@ describe('AstroLogger', () => {
8989describe ( 'AstroIntegrationLogger' , ( ) => {
9090 function createSpyDestination ( ) {
9191 const calls : { method : string } [ ] = [ ] ;
92- const destination : AstroLoggerDestination < AstroLoggerMessage > = {
92+ const destination : AstroLoggerDestination = {
9393 write : ( ) => { } ,
9494 flush : ( ) => {
9595 calls . push ( { method : 'flush' } ) ;
@@ -113,7 +113,7 @@ describe('AstroIntegrationLogger', () => {
113113 } ) ;
114114
115115 it ( 'does not throw when destination has no flush' , ( ) => {
116- const destination : AstroLoggerDestination < AstroLoggerMessage > = {
116+ const destination : AstroLoggerDestination = {
117117 write : ( ) => { } ,
118118 } ;
119119 const logger = new AstroIntegrationLogger ( { destination, level : 'info' } , 'test' ) ;
@@ -134,7 +134,7 @@ describe('AstroIntegrationLogger', () => {
134134 } ) ;
135135
136136 it ( 'does not throw when destination has no close' , ( ) => {
137- const destination : AstroLoggerDestination < AstroLoggerMessage > = {
137+ const destination : AstroLoggerDestination = {
138138 write : ( ) => { } ,
139139 } ;
140140 const logger = new AstroIntegrationLogger ( { destination, level : 'info' } , 'test' ) ;
0 commit comments