Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/sentry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class SentryClient {
List<int> body = utf8.encode(json.encode(data));
if (compressPayload) {
headers['Content-Encoding'] = 'gzip';
body = GZIP.encode(body);
body = gzip.encode(body);
}

final Response response =
Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ dev_dependencies:
test: ">=0.12.0 <2.0.0"
yaml: ">=2.1.0 <3.0.0"
mockito: ">=2.0.0 <4.0.0"
flutter_test:
sdk: flutter
4 changes: 2 additions & 2 deletions test/sentry_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ void main() {

Map<String, dynamic> data;
if (compressPayload) {
data = json.decode(utf8.decode(GZIP.decode(body)));
data = json.decode(utf8.decode(gzip.decode(body)));
} else {
data = json.decode(utf8.decode(body));
}
final Map<String, dynamic> stacktrace = data.remove('stacktrace');
expect(stacktrace['frames'], const isInstanceOf<List>());
expect(stacktrace['frames'], const TypeMatcher<List>());
expect(stacktrace['frames'], isNotEmpty);

final Map<String, dynamic> topFrame =
Expand Down
2 changes: 1 addition & 1 deletion test/version_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void main() {
group('sdkVersion', () {
test('matches that of pubspec.yaml', () {
final dynamic pubspec =
yaml.loadYaml(new File('pubspec.yaml').readAsStringSync());
yaml.loadYaml(new File('../pubspec.yaml').readAsStringSync());
expect(sdkVersion, pubspec['version']);
});
});
Expand Down