OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2017, 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 'dart:io'; |
| 6 |
| 7 import 'package:telemetry/telemetry.dart'; |
| 8 import 'package:test/test.dart'; |
| 9 import 'package:usage/usage.dart'; |
| 10 |
| 11 void main() { |
| 12 group('telemetry', () { |
| 13 test('getDartStorageDirectory', () { |
| 14 Directory dir = getDartStorageDirectory(); |
| 15 expect(dir, isNotNull); |
| 16 }); |
| 17 |
| 18 test('getDartVersion', () { |
| 19 expect(getDartVersion(), isNotNull); |
| 20 }); |
| 21 |
| 22 test('createAnalyticsInstance', () { |
| 23 Analytics analytics = createAnalyticsInstance('UA-0', 'test-app'); |
| 24 expect(analytics, isNotNull); |
| 25 expect(analytics.trackingId, 'UA-0'); |
| 26 expect(analytics.getSessionValue('an'), 'test-app'); |
| 27 expect(analytics.getSessionValue('av'), isNotNull); |
| 28 expect(analytics.clientId, isNotNull); |
| 29 }); |
| 30 }); |
| 31 } |
OLD | NEW |