Skip to content

Commit

Permalink
Launch Tandem if it has not been launched already, so that phetioAPIV…
Browse files Browse the repository at this point in the history
…alidation can run, see #1046
  • Loading branch information
samreid committed Oct 12, 2020
1 parent 73b41af commit fa97e8c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions js/nodes/NodeTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ if ( Tandem.PHET_IO_ENABLED ) {

QUnit.test( 'Node instrumented visible Property', assert => {

const wasLaunched = Tandem.launched;
if ( !Tandem.launched ) {
Tandem.launch();
}

const apiValidation = phet.tandem.phetioAPIValidation;
const previousEnabled = apiValidation.enabled;
const previousSimStarted = apiValidation.simHasStarted;
Expand Down Expand Up @@ -377,5 +382,9 @@ if ( Tandem.PHET_IO_ENABLED ) {
otherInstrumentedVisibleProperty.dispose();
apiValidation.simHasStarted = previousSimStarted;
apiValidation.enabled = previousEnabled;

if ( !wasLaunched ) {
Tandem.unlaunch();
}
} );
}

0 comments on commit fa97e8c

Please sign in to comment.