Created
May 27, 2015 03:23
-
-
Save goatslacker/0170deacb0ca2ede64d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Alt from './' | |
import AltTestingUtils from './utils/AltTestingUtils' | |
const alt = new Alt() | |
const Store = alt.createStore(class { | |
constructor() { | |
this.x = 2 | |
this.exportPublicMethods({ | |
update: this.update.bind(this) | |
}) | |
} | |
update() { | |
this.x += 1 | |
} | |
}) | |
console.log(Store.update) | |
const test = AltTestingUtils.makeStoreTestable(alt, Store.StoreModel) | |
console.log(test) | |
console.log(test.update()) | |
console.log(test) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment