Skip to content

Commit

Permalink
Create a query parameter that accepts a seed to shuffle listeners, see:
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed Apr 3, 2023
1 parent 83b6dcc commit cee7cb6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions js/initialize-globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,17 @@
/**
* Shuffles listeners each time they are notified, to help us test order dependency, see https://github.com/phetsims/axon/issues/215
*/
shuffleListeners: { type: 'flag' },
listenerOrder: {
type: 'string',
defaultValue: 'default',
isValidValue: function( value ) {

/**
* Reverses the order of listeners each time they are notified, to help us test order dependency, see https://github.com/phetsims/axon/issues/215
*/
reverseListeners: { type: 'flag' },
// NOTE: this regular expression must be maintained in TinyEmitter.ts as well.
const regex = /random(?:%28|\()(\d+)(?:%29|\))/;

return value === 'default' || value === 'random' || value === 'reverse' || value.match( regex );
}
},

/**
* When true, use SpeechSynthesisParentPolyfill to assign an implementation of SpeechSynthesis
Expand Down

0 comments on commit cee7cb6

Please sign in to comment.