Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed Nov 22, 2023
1 parent 4b254cc commit d032436
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions pkgs/firehose/lib/src/github.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ class GithubApi {
String? get githubAuthToken => _env['GITHUB_TOKEN'];

/// The owner and repository name. For example, `octocat/Hello-World`.
RepositorySlug? get repoSlug =>
_repoSlug ?? RepositorySlug.full(_env['GITHUB_REPOSITORY']!);
RepositorySlug? get repoSlug {
return _repoSlug ??
(_env['GITHUB_REPOSITORY'] != null
? RepositorySlug.full(_env['GITHUB_REPOSITORY']!)
: null);
}

/// The PR (or issue) number.
int? get issueNumber =>
Expand Down
4 changes: 1 addition & 3 deletions pkgs/firehose/test/coverage_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ void main() {
});
test('Compare coverage', () async {
var coverages = FakeHealth().compareCoveragesFor(
[
GitFile('testfile.dart', FileStatus.modified),
],
[GitFile('testfile.dart', FileStatus.modified)],
'base_path_does_not_exist',
);

Expand Down
3 changes: 3 additions & 0 deletions pkgs/firehose/test/github_test.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:firehose/src/github.dart';
import 'package:github/github.dart';
import 'package:test/test.dart';
Expand Down

0 comments on commit d032436

Please sign in to comment.