hello_test.dart 552 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter_test/flutter_test.dart';
6
import 'package:hello_world/main.dart' as hello_world;
7 8

void main() {
9
  testWidgets('Hello world smoke test', (WidgetTester tester) async {
10
    hello_world.main(); // builds the app and schedules a frame but doesn't trigger one
11
    await tester.pump(); // triggers a frame
12

13
    expect(find.text('Hello, world!'), findsOneWidget);
14 15
  });
}