This repository has been archived by the owner on May 17, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement wrapper in
fusion-test-utils
to encapsulate plugin resolu…
…tion (#38) * Added Flow types * Implement 'registerAsTest' which returns request and render * Update unit tests to leverage 'registerAsTest' * Test plugin resolution with dependency injection * Use registry.yarnpkg.com instead of internal registry * Added a test fixture example for registerAsTest * Rename 'registerAsTest' to 'getSimulator' for clarity-sake * Update documentation
- Loading branch information
1 parent
21a899f
commit 395defd
Showing
8 changed files
with
130 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
[ignore] | ||
.*/node_modules/.*[^(package)]\.json$ | ||
<PROJECT_ROOT>/dist/.* | ||
|
||
[include] | ||
./src/ | ||
|
||
[libs] | ||
./node_modules/fusion-core/flow-typed | ||
|
||
[lints] | ||
|
||
[options] | ||
suppress_comment= \\(.\\|\n\\)*\\$FlowIgnore | ||
|
||
[strict] |
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
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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
import {compose} from 'fusion-core'; | ||
// @flow | ||
|
||
export default function simulate(app, ctx) { | ||
app.resolve(); | ||
// $FlowFixMe | ||
import FusionApp, {compose} from 'fusion-core'; | ||
import type {Context} from 'fusion-core'; | ||
|
||
export default function simulate(app: FusionApp, ctx: Context): Promise<*> { | ||
return compose(app.plugins)(ctx, () => Promise.resolve()).then(() => ctx); | ||
} |
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