@@ -290,11 +290,7 @@ describe('service', function () {
290290
291291 // Assert
292292 var report = powerbi . get ( $reportContainer [ 0 ] ) ;
293- // TODO: Find way to prevent using private method getAccessToken.
294- // Need to know what token the report used, but don't have another option?
295- // To properly only test public methods but still confirm this we would need to create special iframe which echoed all
296- // messages and then we could test what it received
297- var accessToken = ( < any > report ) . getAccessToken ( ) ;
293+ var accessToken = report . config . accessToken ;
298294
299295 expect ( accessToken ) . toEqual ( testToken ) ;
300296 } ) ;
@@ -1742,7 +1738,7 @@ describe('SDK-to-HPM', function () {
17421738 } ) ;
17431739
17441740 afterAll ( function ( ) {
1745- // TODO: Should call remove using the powerbi service first to clean up intenral references to DOM inside this element
1741+ powerbi . reset ( $ element. get ( 0 ) ) ;
17461742 $element . remove ( ) ;
17471743 powerbi . wpmp . stop ( ) ;
17481744 } ) ;
@@ -2722,7 +2718,7 @@ describe('SDK-to-WPMP', function () {
27222718 } ) ;
27232719
27242720 afterAll ( function ( ) {
2725- // TODO: Should call remove using the powerbi service first to clean up intenral references to DOM inside this element
2721+ powerbi . reset ( $ element. get ( 0 ) ) ;
27262722 $element . remove ( ) ;
27272723 powerbi . wpmp . stop ( ) ;
27282724 } ) ;
@@ -2949,7 +2945,7 @@ describe('SDK-to-MockApp', function () {
29492945 } ) ;
29502946
29512947 afterAll ( function ( ) {
2952- // TODO: Should call remove using the powerbi service first to clean up intenral references to DOM inside this element
2948+ powerbi . reset ( $ element. get ( 0 ) ) ;
29532949 $element . remove ( ) ;
29542950 powerbi . wpmp . stop ( ) ;
29552951 } ) ;
@@ -2961,10 +2957,6 @@ describe('SDK-to-MockApp', function () {
29612957 describe ( 'report' , function ( ) {
29622958 describe ( 'load' , function ( ) {
29632959 it ( `report.load() returns promise that rejects with validation errors if load configuration is invalid` , function ( done ) {
2964- /**
2965- * TODO: Add settings to load config
2966- */
2967-
29682960 // Arrange
29692961 const testData = {
29702962 loadConfig : {
0 commit comments