update formatting for recent lints (dart-lang/pubspec_parse#108)
diff --git a/pkgs/pubspec_parse/test/dependency_test.dart b/pkgs/pubspec_parse/test/dependency_test.dart index b366887..71b148c 100644 --- a/pkgs/pubspec_parse/test/dependency_test.dart +++ b/pkgs/pubspec_parse/test/dependency_test.dart
@@ -112,7 +112,7 @@ test('map w/ version and hosted as Map', () { final dep = _dependency<HostedDependency>({ 'version': '^1.0.0', - 'hosted': {'name': 'hosted_name', 'url': 'https://hosted_url'} + 'hosted': {'name': 'hosted_name', 'url': 'https://hosted_url'}, }); expect(dep.version.toString(), '^1.0.0'); expect(dep.hosted!.name, 'hosted_name'); @@ -124,7 +124,7 @@ final dep = _dependency<HostedDependency>( { 'version': '^1.0.0', - 'hosted': {'url': 'https://hosted_url'} + 'hosted': {'url': 'https://hosted_url'}, }, skipTryPub: true, // todo: Unskip once pub supports this syntax ); @@ -139,7 +139,7 @@ _expectThrows( { 'version': 'not a version', - 'hosted': {'name': 'hosted_name', 'url': 'hosted_url'} + 'hosted': {'name': 'hosted_name', 'url': 'hosted_url'}, }, r''' line 5, column 15: Unsupported value for "version". Could not parse version "not a version". Unknown text at "not a version". @@ -155,7 +155,7 @@ { 'version': '^1.0.0', 'hosted': {'name': 'hosted_name', 'url': 'hosted_url'}, - 'not_supported': null + 'not_supported': null, }, r''' line 10, column 4: Unrecognized keys: [not_supported]; supported keys: [sdk, git, path, hosted] @@ -286,7 +286,7 @@ test('map', () { final dep = _dependency<GitDependency>({ - 'git': {'url': 'url', 'path': 'path', 'ref': 'ref'} + 'git': {'url': 'url', 'path': 'path', 'ref': 'ref'}, }); expect(dep.url.toString(), 'url'); expect(dep.path, 'path'); @@ -332,7 +332,7 @@ test('git - null url', () { _expectThrowsContaining( { - 'git': {'url': null} + 'git': {'url': null}, }, r"type 'Null' is not a subtype of type 'String'", ); @@ -341,7 +341,7 @@ test('git - int url', () { _expectThrowsContaining( { - 'git': {'url': 42} + 'git': {'url': 42}, }, r"type 'int' is not a subtype of type 'String'", ); @@ -407,7 +407,7 @@ expectParseThrows( { 'name': 'sample', - 'dependencies': {'dep': content} + 'dependencies': {'dep': content}, }, expectedError, ); @@ -417,7 +417,7 @@ expectParseThrowsContaining( { 'name': 'sample', - 'dependencies': {'dep': content} + 'dependencies': {'dep': content}, }, errorText, ); @@ -430,7 +430,7 @@ final value = parse( { ...defaultPubspec, - 'dependencies': {'dep': content} + 'dependencies': {'dep': content}, }, skipTryPub: skipTryPub, );
diff --git a/pkgs/pubspec_parse/test/parse_test.dart b/pkgs/pubspec_parse/test/parse_test.dart index f4d6476..99199c7 100644 --- a/pkgs/pubspec_parse/test/parse_test.dart +++ b/pkgs/pubspec_parse/test/parse_test.dart
@@ -53,7 +53,7 @@ ], 'topics': ['widget', 'button'], 'screenshots': [ - {'description': 'my screenshot', 'path': 'path/to/screenshot'} + {'description': 'my screenshot', 'path': 'path/to/screenshot'}, ], }); expect(value.name, 'sample'); @@ -91,7 +91,7 @@ 'environment': { 'sdk': '>=2.12.0 <3.0.0', 'bob': null, - } + }, }, skipTryPub: true, ); @@ -135,7 +135,7 @@ null: null, 'http': 'http://example.com', 'https': 'https://example.com', - 'none': 'none' + 'none': 'none', }.entries) { test('can be ${entry.key}', () { final value = parse({ @@ -160,7 +160,7 @@ test('one author, via authors', () { final value = parse({ ...defaultPubspec, - 'authors': ['name@example.com'] + 'authors': ['name@example.com'], }); expect(value.author, 'name@example.com'); expect(value.authors, ['name@example.com']); @@ -169,7 +169,7 @@ test('many authors', () { final value = parse({ ...defaultPubspec, - 'authors': ['name@example.com', 'name2@example.com'] + 'authors': ['name@example.com', 'name2@example.com'], }); expect(value.author, isNull); expect(value.authors, ['name@example.com', 'name2@example.com']); @@ -179,7 +179,7 @@ final value = parse({ ...defaultPubspec, 'author': 'name@example.com', - 'authors': ['name2@example.com'] + 'authors': ['name2@example.com'], }); expect(value.author, isNull); expect(value.authors, ['name@example.com', 'name2@example.com']); @@ -189,7 +189,7 @@ final value = parse({ ...defaultPubspec, 'author': 'name@example.com', - 'authors': ['name@example.com', 'name@example.com'] + 'authors': ['name@example.com', 'name@example.com'], }); expect(value.author, 'name@example.com'); expect(value.authors, ['name@example.com']); @@ -269,7 +269,7 @@ expectParseThrows( { 'name': 'sample', - 'environment': {'dart': 'cool'} + 'environment': {'dart': 'cool'}, }, r''' line 4, column 3: Use "sdk" to for Dart SDK constraints. @@ -284,7 +284,7 @@ expectParseThrows( { 'name': 'sample', - 'environment': {'sdk': 42} + 'environment': {'sdk': 42}, }, r''' line 4, column 10: Unsupported value for "sdk". `42` is not a String. @@ -313,7 +313,7 @@ expectParseThrows( { 'name': 'sample', - 'environment': {'sdk': 'silly'} + 'environment': {'sdk': 'silly'}, }, r''' line 4, column 10: Unsupported value for "sdk". Could not parse version "silly". Unknown text at "silly". @@ -430,7 +430,7 @@ final value = parse({ ...defaultPubspec, 'screenshots': [ - {'description': 'my screenshot', 'path': 'path/to/screenshot'} + {'description': 'my screenshot', 'path': 'path/to/screenshot'}, ], }); expect(value.screenshots, hasLength(1)); @@ -445,7 +445,7 @@ {'description': 'my screenshot', 'path': 'path/to/screenshot'}, { 'description': 'my second screenshot', - 'path': 'path/to/screenshot2' + 'path': 'path/to/screenshot2', }, ], }); @@ -464,7 +464,7 @@ { 'description': 'my screenshot', 'path': 'path/to/screenshot', - 'extraKey': 'not important' + 'extraKey': 'not important', }, 'not a screenshot', ], @@ -659,7 +659,7 @@ 'name': 'sample', 'dependencies': { 'foo': { - 'git': {'url': 1} + 'git': {'url': 1}, }, }, 'issue_tracker': {'x': 'y'},