@@ -28,7 +28,8 @@ import { Permissions } from "@executablemd/runtime";
2828 * therefore resolved nothing and selected nothing.
2929 */
3030
31- import { describe , it } from "@executablemd/test-support/bdd" ;
31+ import { beforeEach , describe , it } from "@executablemd/test-support/bdd" ;
32+ import { journalBeforeEach , useJournalStream } from "@executablemd/test-support/failure-journal" ;
3233import { expect } from "@executablemd/test-support/expect" ;
3334import {
3435 ensure ,
@@ -532,8 +533,11 @@ function* admitted(events: readonly DurableEvent[]): Operation<string | undefine
532533
533534/** The question an entry is left at, never answered. */
534535const QUESTION = '<Elicit schema={{ type: "object" }} as="answer">Continue?</Elicit>' ;
536+ const OWNER = "packages/cli/tests/retained-repository-git.test.ts" ;
535537
536538describe ( "one entry's local Add, Switch and Commit" , ( ) => {
539+ beforeEach ( journalBeforeEach ( OWNER ) ) ;
540+
537541 it ( "E2: replays acknowledged Switch, Add and Commit with no Git work" , function * ( ) {
538542 const fixture = yield * useFixture ( ) ;
539543 const live = counters ( ) ;
@@ -667,7 +671,7 @@ describe("one entry's local Add, Switch and Commit", () => {
667671 const performed = yield * run (
668672 fixture ,
669673 '<Git.Switch branch="ready" base="nothing-resolves-this" />' ,
670- new InMemoryStream ( ) ,
674+ yield * useJournalStream ( join ( fixture . root , "entry.md" ) ) ,
671675 counted ,
672676 ) ;
673677
@@ -694,7 +698,7 @@ describe("one entry's local Add, Switch and Commit", () => {
694698 const performed = yield * run (
695699 fixture ,
696700 '<Git.Switch branch="fresh" />' ,
697- new InMemoryStream ( ) ,
701+ yield * useJournalStream ( join ( fixture . root , "entry.md" ) ) ,
698702 counted ,
699703 ) ;
700704
@@ -770,7 +774,7 @@ describe("one entry's local Add, Switch and Commit", () => {
770774 const performed = yield * run (
771775 fixture ,
772776 [ '<Git.Commit message="Record the index" as="commit" />' , "Commit: {commit}" ] . join ( "\n" ) ,
773- new InMemoryStream ( ) ,
777+ yield * useJournalStream ( join ( fixture . root , "entry.md" ) ) ,
774778 counted ,
775779 ) ;
776780
@@ -1228,9 +1232,19 @@ describe("one entry's local Add, Switch and Commit", () => {
12281232 const source = '<Git.Add paths="note.md" />' ;
12291233
12301234 const first = counters ( ) ;
1231- const one = yield * run ( fixture , source , new InMemoryStream ( ) , first ) ;
1235+ const one = yield * run (
1236+ fixture ,
1237+ source ,
1238+ yield * useJournalStream ( join ( fixture . root , "entry.md" ) ) ,
1239+ first ,
1240+ ) ;
12321241 const second = counters ( ) ;
1233- const two = yield * run ( fixture , source , new InMemoryStream ( ) , second ) ;
1242+ const two = yield * run (
1243+ fixture ,
1244+ source ,
1245+ yield * useJournalStream ( join ( fixture . root , "entry.md" ) ) ,
1246+ second ,
1247+ ) ;
12341248
12351249 expect ( one . refusal ) . toBe ( undefined ) ;
12361250 expect ( two . refusal ) . toBe ( undefined ) ;
0 commit comments