Skip to content

Commit be29b40

Browse files
committed
Only save targeted that marks to fixture
1 parent f6db9e4 commit be29b40

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

src/TestCase.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,9 @@ export default class TestCase {
141141
}
142142

143143
isThatMarkTargeted() {
144-
return this.context.thatMark.get().every(({ selection: thatSelection }) => {
145-
return Object.values(this.marks).some((targetedSelection) => {
146-
return (
147-
thatSelection.end.character === targetedSelection.end.character &&
148-
thatSelection.end.line === targetedSelection.end.line &&
149-
thatSelection.start.character === targetedSelection.start.character &&
150-
thatSelection.start.line === targetedSelection.start.line
151-
);
152-
});
153-
});
144+
return this.targets.some(
145+
(target) => target.type === "primitive" && target.mark.type === "that"
146+
);
154147
}
155148

156149
static async getSnapshot(
@@ -177,9 +170,9 @@ export default class TestCase {
177170
snapshot.clipboard = "";
178171
}
179172

180-
// if (this.initialState == null && !this.isThatMarkTargeted()) {
181-
// snapshot.thatMark = [];
182-
// }
173+
if (this.initialState == null && !this.isThatMarkTargeted()) {
174+
snapshot.thatMark = [];
175+
}
183176

184177
if (this.initialState == null) {
185178
this.initialState = snapshot;

0 commit comments

Comments
 (0)