Skip to content

Commit 3f3954a

Browse files
committed
test: game text with url
1 parent 4edaeaf commit 3f3954a

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

electron/main/game/__tests__/game-parser.test.ts

+4-13
Original file line numberDiff line numberDiff line change
@@ -115,22 +115,13 @@ describe('game-parser', () => {
115115
});
116116

117117
it('emits TextGameEvent (anchor link text)', () => {
118-
gameSocketSubject$.next('Visit the <a href="#">play.net</a> website.\n');
119-
120-
expectGameEvent({
121-
type: GameEventType.TEXT,
122-
text: `Visit the `,
123-
});
124-
125-
expectGameEvent({
126-
type: GameEventType.URL,
127-
text: `play.net`,
128-
url: '#',
129-
});
118+
gameSocketSubject$.next(
119+
'Visit the <a href="https://play.net/dr">DragonRealms</a> website.\n'
120+
);
130121

131122
expectGameEvent({
132123
type: GameEventType.TEXT,
133-
text: ` website.\n`,
124+
text: `Visit the <a href="https://play.net/dr" target="_blank">DragonRealms</a> website.\n`,
134125
});
135126
});
136127

0 commit comments

Comments
 (0)