diff --git a/.github/workflows/googleapis_firestore_v1.yaml b/.github/workflows/googleapis_firestore_v1.yaml index 8d98744f..c0342440 100644 --- a/.github/workflows/googleapis_firestore_v1.yaml +++ b/.github/workflows/googleapis_firestore_v1.yaml @@ -35,13 +35,9 @@ jobs: sdk: ${{ matrix.sdk }} - run: dart pub get - - run: dart analyze --fatal-infos - # TODO(devoncarew): We should update protoc_plugin to generate formatted # files. # - run: dart format --output=none --set-exit-if-changed . # if: ${{ matrix.sdk == 'stable' }} - - # Enable once we have tests. - # - run: dart test + - run: dart test diff --git a/pkgs/googleapis_firestore_v1/pubspec.yaml b/pkgs/googleapis_firestore_v1/pubspec.yaml index 743aa261..a446a1b1 100644 --- a/pkgs/googleapis_firestore_v1/pubspec.yaml +++ b/pkgs/googleapis_firestore_v1/pubspec.yaml @@ -17,3 +17,4 @@ dev_dependencies: path: ^1.9.0 # We use a pinned version to make the gRPC library generation hermetic. protoc_plugin: 22.3.0 + test: ^1.26.0 diff --git a/pkgs/googleapis_firestore_v1/test/firestore_client_test.dart b/pkgs/googleapis_firestore_v1/test/firestore_client_test.dart new file mode 100644 index 00000000..7f327502 --- /dev/null +++ b/pkgs/googleapis_firestore_v1/test/firestore_client_test.dart @@ -0,0 +1,18 @@ +// Copyright (c) 2025, 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:googleapis_firestore_v1/google/firestore/v1/firestore.pbgrpc.dart'; +import 'package:test/test.dart'; + +void main() { + group('FirestoreClient', () { + test('has defaultHost', () { + expect(FirestoreClient.defaultHost, isNotEmpty); + }); + + test('has oauthScopes', () { + expect(FirestoreClient.oauthScopes, isNotEmpty); + }); + }); +}