Skip to content

Instantly share code, notes, and snippets.

@goatslacker
Created May 27, 2015 03:23
Show Gist options
  • Save goatslacker/0170deacb0ca2ede64d7 to your computer and use it in GitHub Desktop.
Save goatslacker/0170deacb0ca2ede64d7 to your computer and use it in GitHub Desktop.
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