Skip to content

Instantly share code, notes, and snippets.

@acdlite
Created April 1, 2015 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acdlite/dfbac9ed62474e1be605 to your computer and use it in GitHub Desktop.
Save acdlite/dfbac9ed62474e1be605 to your computer and use it in GitHub Desktop.
Create Flummox actions from plain JavaScript objects
const flux = new Flux();
flux.createActions('foobar', {
foo() {
return 'bar';
},
bar() {
return 'baz';
}
});
expect(flux.getActions('foobar')).to.be.an.instanceof(Actions);
expect(flux.getActions('foobar').foo()).to.equal('bar');
expect(flux.getActions('foobar').bar()).to.equal('baz');
@acdlite
Copy link
Author

acdlite commented Apr 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment