@@ -2,12 +2,12 @@ import * as ts from "../_namespaces/ts";
22import { deprecate } from "../../deprecatedCompat/deprecate" ;
33
44describe ( "unittests:: debugDeprecation" , ( ) => {
5- let loggingHost : ts . LoggingHost | undefined ;
5+ let loggingHost : ts . Debug . LoggingHost | undefined ;
66 beforeEach ( ( ) => {
77 loggingHost = ts . Debug . loggingHost ;
88 } ) ;
99 afterEach ( ( ) => {
10- ts . Debug . loggingHost = loggingHost ;
10+ ts . Debug . setLoggingHost ( loggingHost ) ;
1111 loggingHost = undefined ;
1212 } ) ;
1313 describe ( "deprecateFunction" , ( ) => {
@@ -17,11 +17,11 @@ describe("unittests:: debugDeprecation", () => {
1717 typeScriptVersion : "3.8"
1818 } ) ;
1919 let logWritten = false ;
20- ts . Debug . loggingHost = {
20+ ts . Debug . setLoggingHost ( {
2121 log ( ) {
2222 logWritten = true ;
2323 }
24- } ;
24+ } ) ;
2525 deprecation ( ) ;
2626 assert . isFalse ( logWritten ) ;
2727 } ) ;
@@ -31,11 +31,11 @@ describe("unittests:: debugDeprecation", () => {
3131 typeScriptVersion : "3.9"
3232 } ) ;
3333 let logWritten = false ;
34- ts . Debug . loggingHost = {
34+ ts . Debug . setLoggingHost ( {
3535 log ( ) {
3636 logWritten = true ;
3737 }
38- } ;
38+ } ) ;
3939 deprecation ( ) ;
4040 assert . isTrue ( logWritten ) ;
4141 } ) ;
@@ -44,11 +44,11 @@ describe("unittests:: debugDeprecation", () => {
4444 typeScriptVersion : "3.9"
4545 } ) ;
4646 let logWritten = false ;
47- ts . Debug . loggingHost = {
47+ ts . Debug . setLoggingHost ( {
4848 log ( ) {
4949 logWritten = true ;
5050 }
51- } ;
51+ } ) ;
5252 deprecation ( ) ;
5353 assert . isTrue ( logWritten ) ;
5454 } ) ;
@@ -57,11 +57,11 @@ describe("unittests:: debugDeprecation", () => {
5757 typeScriptVersion : "3.9"
5858 } ) ;
5959 let logWrites = 0 ;
60- ts . Debug . loggingHost = {
60+ ts . Debug . setLoggingHost ( {
6161 log ( ) {
6262 logWrites ++ ;
6363 }
64- } ;
64+ } ) ;
6565 deprecation ( ) ;
6666 deprecation ( ) ;
6767 assert . equal ( logWrites , 1 ) ;
@@ -73,11 +73,11 @@ describe("unittests:: debugDeprecation", () => {
7373 typeScriptVersion : "3.9"
7474 } ) ;
7575 let logWritten = false ;
76- ts . Debug . loggingHost = {
76+ ts . Debug . setLoggingHost ( {
7777 log ( ) {
7878 logWritten = true ;
7979 }
80- } ;
80+ } ) ;
8181 expect ( deprecation ) . throws ( ) ;
8282 assert . isFalse ( logWritten ) ;
8383 } ) ;
@@ -86,11 +86,11 @@ describe("unittests:: debugDeprecation", () => {
8686 error : true ,
8787 } ) ;
8888 let logWritten = false ;
89- ts . Debug . loggingHost = {
89+ ts . Debug . setLoggingHost ( {
9090 log ( ) {
9191 logWritten = true ;
9292 }
93- } ;
93+ } ) ;
9494 expect ( deprecation ) . throws ( ) ;
9595 assert . isFalse ( logWritten ) ;
9696 } ) ;
0 commit comments