hello_test.dart 541 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
// Copyright 2016 The Chromium Authors. 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:flutter_test/flutter_test.dart';

import '../lib/main.dart' as hello_world;

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

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