-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass the alt instance to the constructors
- Loading branch information
1 parent
4f31eac
commit f42b43a
Showing
4 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import assert from 'assert' | ||
import Alt from '../dist/alt-with-runtime' | ||
|
||
let alt = new Alt() | ||
|
||
export default { | ||
'the stores get the alt instance'() { | ||
class MyStore { | ||
constructor(alt) { | ||
assert.equal(alt instanceof Alt, true, 'alt is an instance of Alt') | ||
} | ||
} | ||
|
||
alt.createStore(MyStore) | ||
}, | ||
|
||
'the actions get the alt instance'() { | ||
class MyActions { | ||
constructor(alt) { | ||
assert.equal(alt instanceof Alt, true, 'alt is an instance of Alt') | ||
} | ||
} | ||
|
||
alt.createActions(MyActions) | ||
} | ||
} |