Skip to content

Instantly share code, notes, and snippets.

@nicoespeon
Last active March 23, 2016 23:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nicoespeon/a8680be90f1f629ca35f to your computer and use it in GitHub Desktop.
Blog - Testing Marionette.js Behaviors - problem
const Alert = Marionette.Behavior.extend( {
defaults: {
title: "Alert!",
message: "Not really urgent"
},
events: {
"click": "emitAlert"
},
emitAlert() {
alert( this.options.message );
}
} );
it( "should emit an alert", () => {
// => This won't work
expect( Behavior.emitAlert() ).toEmitAnAlert();
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment