mirror of
https://github.com/motajs/template.git
synced 2026-11-01 22:24:31 +08:00
fix(03-10): restore direct replay fixture path
- Register the fixture event and maps through existing data APIs - Await the synchronous mutation marker before the final snapshot
This commit is contained in:
1 parent
e4e39f7b2b
commit
45e3b1f05d
4 files changed
+74
-136
No files matched your search
@@ -50,6 +50,7 @@ interface IClosedLoopFixture {
|
||||
readonly route: IReplayArray;
|
||||
readonly sandbox: IReplaySandbox;
|
||||
readonly expected: IReplayVerifierExpectedSnapshot;
|
||||
readonly eventCompletion: Promise<void>;
|
||||
}
|
||||
|
||||
interface IClosedLoopModule {
|
||||
@@ -107,6 +108,7 @@ function createRuntime(fixture: IClosedLoopFixture): IReplayVerifierRuntime {
|
||||
sandbox.pausing = true;
|
||||
sandbox.play();
|
||||
await waitForEnded(sandbox);
|
||||
await fixture.eventCompletion;
|
||||
},
|
||||
snapshot: () => ({
|
||||
hero: fixture.state.hero.attribute.toStructured(),
|
||||
|
||||
Reference in new issue
Block a user