-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add tests, update ci, update readme (#22)
* Update README.md * Update README.md * add tests * add tests to vector_map_tiles_pmtiles * add lints and format check to ci * add example to ci checks, build web in pr workflow
- Loading branch information
Showing
16 changed files
with
769 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'package:flutter_map/flutter_map.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:mockito/annotations.dart'; | ||
import 'package:mockito/mockito.dart'; | ||
import 'package:pmtiles/pmtiles.dart'; | ||
|
||
@GenerateNiceMocks([MockSpec<PmTilesArchive>()]) | ||
import 'integration_test.mocks.dart'; | ||
import 'utils/test_app.dart'; | ||
|
||
Future<void> main() async { | ||
testWidgets('FlutterMap with MbTilesTileProvider', (tester) async { | ||
final pmTiles = MockPmTilesArchive(); | ||
when(pmTiles.tile(captureAny)).thenAnswer((params) async => Tile( | ||
params.positionalArguments.first, | ||
bytes: TileProvider.transparentImage, | ||
compression: Compression.none, | ||
type: TileType.png, | ||
)); | ||
await tester.pumpWidget(TestApp(pmTiles: pmTiles)); | ||
await tester.pumpAndSettle(); | ||
}); | ||
} |
Oops, something went wrong.