Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test cases may be outdated #327

Closed
myConsciousness opened this issue Aug 22, 2022 · 3 comments
Closed

Test cases may be outdated #327

myConsciousness opened this issue Aug 22, 2022 · 3 comments

Comments

@myConsciousness
Copy link

I have run dart test just after clone this repository.

dart test
00:00 +3 -1: test/unit/common/model/misc_test.dart: RateLimit fromRateLimitResponse [E]                                                                                                                                                                                               
  FormatException: Unexpected end of input (at line 9, character 8)
        }
         ^
  
  dart:convert                                 jsonDecode
  test/unit/common/model/misc_test.dart 20:43  main.<fn>.<fn>
  
00:00 +4 -1: test/data_object_test.dart: License round-trip                                                                                                                                                                                                                           
To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/unit/common/model/misc_test.dart -p vm --plain-name 'RateLimit fromRateLimitResponse'
00:00 +8 -2: test/unit/common/model/repos_releases_test.dart: CreateRelease fromJson [E]                                                                                                                                                                                              
  Expected: return normally
    Actual: <Closure: () => CreateRelease>
     Which: threw _CastError:<type 'Null' is not a subtype of type 'bool' in type cast>
  
  package:test_api                                      expect
  test/unit/common/model/repos_releases_test.dart 33:7  main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/unit/common/model/repos_releases_test.dart -p vm --plain-name 'CreateRelease fromJson'
00:00 +8 -3: test/unit/common/model/repos_releases_test.dart: CreateRelease toJson [E]                                                                                                                                                                                                
  type 'Null' is not a subtype of type 'bool' in type cast
  package:github/src/common/model/repos_releases.g.dart 104:63  _$CreateReleaseFromJson
  package:github/src/common/model/repos_releases.dart 218:7     new CreateRelease.fromJson
  test/unit/common/model/repos_releases_test.dart 38:43         main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/unit/common/model/repos_releases_test.dart -p vm --plain-name 'CreateRelease toJson'
00:01 +13 -3: loading test/code_search_test.dart                                                                                                                                                                                                                                      
Searching ...
00:01 +13 -4: test/git_test.dart: getBlob() constructs correct path [E]                                                                                                                                                                                                               
  type 'Null' is not a subtype of type 'GitBlob' in type cast
  dart:async                                        new Future.value
  test/src/mocks.mocks.dart 144:24                  MockGitHub.getJSON
  package:github/src/common/git_service.dart 17:14  GitService.getBlob
  test/git_test.dart 25:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'getBlob() constructs correct path'
00:01 +13 -5: test/git_test.dart: createBlob() constructs correct path [E]                                                                                                                                                                                                            
  type 'Null' is not a subtype of type 'GitBlob' in type cast
  dart:async                                        new Future.value
  test/src/mocks.mocks.dart 166:24                  MockGitHub.postJSON
  package:github/src/common/git_service.dart 25:19  GitService.createBlob
  test/git_test.dart 36:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'createBlob() constructs correct path'
00:01 +13 -6: test/git_test.dart: createBlob() creates valid JSON body [E]                                                                                                                                                                                                            
  type 'Null' is not a subtype of type 'GitBlob' in type cast
  dart:async                                        new Future.value
  test/src/mocks.mocks.dart 166:24                  MockGitHub.postJSON
  package:github/src/common/git_service.dart 25:19  GitService.createBlob
  test/git_test.dart 49:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'createBlob() creates valid JSON body'
00:01 +13 -7: test/git_test.dart: getCommit() constructs correct path [E]                                                                                                                                                                                                             
  type 'Null' is not a subtype of type 'GitCommit' in type cast
  dart:async                                        new Future.value
  test/src/mocks.mocks.dart 144:24                  MockGitHub.getJSON
  package:github/src/common/git_service.dart 35:14  GitService.getCommit
  test/git_test.dart 58:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'getCommit() constructs correct path'
00:01 +13 -8: test/git_test.dart: createCommit() constructs correct path [E]                                                                                                                                                                                                          
  type 'Null' is not a subtype of type 'GitCommit' in type cast
  dart:async                                        new Future.value
  test/src/mocks.mocks.dart 166:24                  MockGitHub.postJSON
  package:github/src/common/git_service.dart 43:19  GitService.createCommit
  test/git_test.dart 69:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'createCommit() constructs correct path'
00:01 +13 -9: test/git_test.dart: createCommit() creates valid JSON body [E]                                                                                                                                                                                                          
  type 'Null' is not a subtype of type 'GitCommit' in type cast
  dart:async                                        new Future.value
  test/src/mocks.mocks.dart 166:24                  MockGitHub.postJSON
  package:github/src/common/git_service.dart 43:19  GitService.createCommit
  test/git_test.dart 89:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'createCommit() creates valid JSON body'
00:01 +13 -10: test/git_test.dart: getReference() constructs correct path [E]                                                                                                                                                                                                         
  type 'Null' is not a subtype of type 'GitReference' in type cast
  dart:async                                        new Future.value
  test/src/mocks.mocks.dart 144:24                  MockGitHub.getJSON
  package:github/src/common/git_service.dart 55:14  GitService.getReference
  test/git_test.dart 107:11                         main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'getReference() constructs correct path'
00:01 +13 -11: test/git_test.dart: createReference() constructs correct path [E]                                                                                                                                                                                                      
  type 'Null' is not a subtype of type 'GitReference' in type cast
  dart:async                                        new Future.value
  test/src/mocks.mocks.dart 166:24                  MockGitHub.postJSON
  package:github/src/common/git_service.dart 84:19  GitService.createReference
  test/git_test.dart 118:11                         main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'createReference() constructs correct path'
00:01 +13 -12: test/git_test.dart: createReference() creates valid JSON body [E]                                                                                                                                                                                                      
  type 'Null' is not a subtype of type 'GitReference' in type cast
  dart:async                                        new Future.value
  test/src/mocks.mocks.dart 166:24                  MockGitHub.postJSON
  package:github/src/common/git_service.dart 84:19  GitService.createReference
  test/git_test.dart 127:11                         main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'createReference() creates valid JSON body'
00:01 +13 -13: test/git_test.dart: editReference() constructs correct path [E]                                                                                                                                                                                                        
  Invalid argument(s): An argument matcher (like `any`) was either not used as an immediate argument to Symbol("request") (argument matchers can only be used as an argument for the very method being stubbed or verified), or was used as a named argument without the Mockito "named" API (Each argument matcher that is used as a named argument needs to specify the name of the argument it is being used in. For example: `when(obj.fn(x: anyNamed("x")))`).
  package:mockito/src/mock.dart 409:7   _InvocationForMatchedArguments._reconstitutePositionalArgs
  package:mockito/src/mock.dart 320:31  new _InvocationForMatchedArguments
  package:mockito/src/mock.dart 288:18  _useMatchedInvocationIfSet
  package:mockito/src/mock.dart 162:18  Mock.noSuchMethod
  test/src/mocks.mocks.dart 242:14      MockGitHub.request
  test/git_test.dart 140:19             main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'editReference() constructs correct path'
00:01 +13 -14: test/git_test.dart: editReference() creates valid JSON body [E]                                                                                                                                                                                                        
  Invalid argument(s): An argument matcher (like `any`) was either not used as an immediate argument to Symbol("request") (argument matchers can only be used as an argument for the very method being stubbed or verified), or was used as a named argument without the Mockito "named" API (Each argument matcher that is used as a named argument needs to specify the name of the argument it is being used in. For example: `when(obj.fn(x: anyNamed("x")))`).
  package:mockito/src/mock.dart 409:7   _InvocationForMatchedArguments._reconstitutePositionalArgs
  package:mockito/src/mock.dart 320:31  new _InvocationForMatchedArguments
  package:mockito/src/mock.dart 288:18  _useMatchedInvocationIfSet
  package:mockito/src/mock.dart 162:18  Mock.noSuchMethod
  test/src/mocks.mocks.dart 242:14      MockGitHub.request
  test/git_test.dart 154:19             main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'editReference() creates valid JSON body'
00:01 +13 -15: test/git_test.dart: deleteReference() constructs correct path [E]                                                                                                                                                                                                      
  Invalid argument(s): `thenReturn` should not be used to return a Future. Instead, use `thenAnswer((_) => future)`.
  package:mockito/src/mock.dart 475:7  PostExpectation.thenReturn
  test/git_test.dart 181:38            main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'deleteReference() constructs correct path'
00:01 +13 -16: test/git_test.dart: getTag() constructs correct path [E]                                                                                                                                                                                                               
  type 'Null' is not a subtype of type 'GitTag' in type cast
  dart:async                                         new Future.value
  test/src/mocks.mocks.dart 144:24                   MockGitHub.getJSON
  package:github/src/common/git_service.dart 125:14  GitService.getTag
  test/git_test.dart 193:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'getTag() constructs correct path'
00:01 +13 -17: test/git_test.dart: createTag() constructs correct path [E]                                                                                                                                                                                                            
  type 'Null' is not a subtype of type 'GitTag' in type cast
  dart:async                                         new Future.value
  test/src/mocks.mocks.dart 166:24                   MockGitHub.postJSON
  package:github/src/common/git_service.dart 133:14  GitService.createTag
  test/git_test.dart 206:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'createTag() constructs correct path'
00:01 +13 -18: test/git_test.dart: createTag() creates valid JSON body [E]                                                                                                                                                                                                            
  type 'Null' is not a subtype of type 'GitTag' in type cast
  dart:async                                         new Future.value
  test/src/mocks.mocks.dart 166:24                   MockGitHub.postJSON
  package:github/src/common/git_service.dart 133:14  GitService.createTag
  test/git_test.dart 215:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'createTag() creates valid JSON body'
00:01 +13 -19: test/git_test.dart: getTree() constructs correct path [E]                                                                                                                                                                                                              
  type 'Null' is not a subtype of type 'GitTree' in type cast
  dart:async                                         new Future.value
  test/src/mocks.mocks.dart 144:24                   MockGitHub.getJSON
  package:github/src/common/git_service.dart 151:19  GitService.getTree
  test/git_test.dart 228:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'getTree() constructs correct path'
00:01 +13 -20: test/git_test.dart: getTree(recursive: true) constructs correct path [E]                                                                                                                                                                                               
  type 'Null' is not a subtype of type 'GitTree' in type cast
  dart:async                                         new Future.value
  test/src/mocks.mocks.dart 144:24                   MockGitHub.getJSON
  package:github/src/common/git_service.dart 151:19  GitService.getTree
  test/git_test.dart 238:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'getTree(recursive: true) constructs correct path'
00:01 +13 -21: test/git_test.dart: createTree() constructs correct path [E]                                                                                                                                                                                                           
  type 'Null' is not a subtype of type 'GitTree' in type cast
  dart:async                                         new Future.value
  test/src/mocks.mocks.dart 166:24                   MockGitHub.postJSON
  package:github/src/common/git_service.dart 160:19  GitService.createTree
  test/git_test.dart 249:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'createTree() constructs correct path'
00:01 +13 -22: test/git_test.dart: createTree() with sha creates valid JSON body [E]                                                                                                                                                                                                  
  type 'Null' is not a subtype of type 'GitTree' in type cast
  dart:async                                         new Future.value
  test/src/mocks.mocks.dart 166:24                   MockGitHub.postJSON
  package:github/src/common/git_service.dart 160:19  GitService.createTree
  test/git_test.dart 265:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'createTree() with sha creates valid JSON body'
00:01 +13 -23: test/git_test.dart: createTree() with content creates valid JSON body [E]                                                                                                                                                                                              
  type 'Null' is not a subtype of type 'GitTree' in type cast
  dart:async                                         new Future.value
  test/src/mocks.mocks.dart 166:24                   MockGitHub.postJSON
  package:github/src/common/git_service.dart 160:19  GitService.createTree
  test/git_test.dart 286:11                          main.<fn>.<fn>
  

To run this test again: /opt/homebrew/Caskroom/flutter/2.8.1/flutter/bin/cache/dart-sdk/bin/dart test test/git_test.dart -p vm --plain-name 'createTree() with content creates valid JSON body'
00:01 +13 -23: loading test/code_search_test.dart                                                                                                                                                                                                                                     
128 results
1 CHANGELOG.md
2 lib/src/common/util/errors.dart
3 lib/src/common.dart
4 test/server/hooks_test_data.dart%    
@github-actions
Copy link

👋 Thanks for reporting! @robrbecker will take a look.

@robrbecker
Copy link
Member

I'm currently working on fixing tests. Thanks for reporting this.

@robrbecker
Copy link
Member

Fixed in #336

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants