Skip to content

Commit e877795

Browse files
committed
fix tests for wasm
1 parent cc5d71f commit e877795

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

flutter/test/replay/masking_config_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ void main() async {
106106
final config = options.buildMaskingConfig();
107107
return config.rules
108108
.map((rule) => rule.toString())
109-
// These normalize the string on VM & web:
109+
// These normalize the string on VM & js & wasm:
110110
.map((str) => str.replaceAll(
111111
RegExp(
112112
r"MaskingDecision from:? [fF]unction '?_maskImagesExceptAssets[@(].*",
113113
dotAll: true),
114-
'MaskingDecision from Function _maskImagesExceptAssets'))
114+
'MaskingDecision)'))
115115
.map((str) => str.replaceAll(
116116
' from: (element, widget) => masking_config.MaskingDecision.mask',
117117
''))
@@ -121,7 +121,7 @@ void main() async {
121121
test('defaults', () {
122122
final sut = SentryReplayOptions();
123123
expect(rulesAsStrings(sut), [
124-
'$SentryMaskingCustomRule<$Image>(Closure: (Element, Widget) => MaskingDecision from Function _maskImagesExceptAssets',
124+
'$SentryMaskingCustomRule<$Image>(Closure: (Element, Widget) => MaskingDecision)',
125125
'$SentryMaskingConstantRule<$Text>(mask)',
126126
'$SentryMaskingConstantRule<$EditableText>(mask)'
127127
]);
@@ -143,7 +143,7 @@ void main() async {
143143
..maskAllImages = true
144144
..maskAssetImages = false;
145145
expect(rulesAsStrings(sut), [
146-
'$SentryMaskingCustomRule<$Image>(Closure: (Element, Widget) => MaskingDecision from Function _maskImagesExceptAssets',
146+
'$SentryMaskingCustomRule<$Image>(Closure: (Element, Widget) => MaskingDecision)',
147147
]);
148148
});
149149

@@ -168,7 +168,7 @@ void main() async {
168168

169169
group('user rules', () {
170170
final defaultRules = [
171-
'$SentryMaskingCustomRule<$Image>(Closure: (Element, Widget) => MaskingDecision from Function _maskImagesExceptAssets',
171+
'$SentryMaskingCustomRule<$Image>(Closure: (Element, Widget) => MaskingDecision)',
172172
'$SentryMaskingConstantRule<$Text>(mask)',
173173
'$SentryMaskingConstantRule<$EditableText>(mask)'
174174
];

0 commit comments

Comments
 (0)