Skip to content

Commit d0966d6

Browse files
authored
add an initial test (#246)
1 parent 4cc1f78 commit d0966d6

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

.github/workflows/googleapis_firestore_v1.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,9 @@ jobs:
3535
sdk: ${{ matrix.sdk }}
3636

3737
- run: dart pub get
38-
3938
- run: dart analyze --fatal-infos
40-
4139
# TODO(devoncarew): We should update protoc_plugin to generate formatted
4240
# files.
4341
# - run: dart format --output=none --set-exit-if-changed .
4442
# if: ${{ matrix.sdk == 'stable' }}
45-
46-
# Enable once we have tests.
47-
# - run: dart test
43+
- run: dart test

pkgs/googleapis_firestore_v1/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ dev_dependencies:
1717
path: ^1.9.0
1818
# We use a pinned version to make the gRPC library generation hermetic.
1919
protoc_plugin: 22.3.0
20+
test: ^1.26.0
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
import 'package:googleapis_firestore_v1/google/firestore/v1/firestore.pbgrpc.dart';
6+
import 'package:test/test.dart';
7+
8+
void main() {
9+
group('FirestoreClient', () {
10+
test('has defaultHost', () {
11+
expect(FirestoreClient.defaultHost, isNotEmpty);
12+
});
13+
14+
test('has oauthScopes', () {
15+
expect(FirestoreClient.oauthScopes, isNotEmpty);
16+
});
17+
});
18+
}

0 commit comments

Comments
 (0)