81a139584e
This CL migrates the `frontend_server_client` package into the Dart SDK repository. Key Changes: - Migration: Moved source code and tests into `pkg/frontend_server_client`. - Monorepo Compliance: Updated the pubspec to align with the SDK pub workspace setup. - Linting: Adopts `package:dart_flutter_team_lints` for analysis options and fixes associated linting errors. - Path Resolution: Resolved package configuration and script path issues encountered in local and CI environments; see the [Workspace Tests Fixes](https://docs.google.com/document/d/1UdiRqP19qYgj-ItxDfqXSdUU6CGimiyK3BmdvjtTEyw/edit?pli=1&tab=t.0#heading=h.xfm1ezicaoik) in the design doc for implementation details. Testing: - All tests passing locally. - CI try bots are green. Design Doc: http://goto.google.com/migrating-webdev Cq-Include-Trybots: luci.dart.try:pkg-win-release-try,pkg-win-release-arm64-try,pkg-mac-release-try,pkg-mac-release-arm64-try,pkg-linux-release-try,pkg-linux-release-arm64-try,pkg-linux-debug-try Change-Id: Id44a701107d626df5fcd21d724980243981c7958 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461200 Reviewed-by: Alexander Thomas <athom@google.com> Commit-Queue: Jessy Yameogo <yjessy@google.com>
34 lines
1.1 KiB
Dart
34 lines
1.1 KiB
Dart
// Copyright 2022 The Dart Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// TODO: The examples don't work on windows
|
|
@TestOn('!windows')
|
|
library;
|
|
|
|
import 'dart:io';
|
|
|
|
import 'package:frontend_server_client/src/package_config_utils.dart';
|
|
import 'package:test/test.dart';
|
|
import 'package:test_process/test_process.dart';
|
|
|
|
void main() {
|
|
test('web client example can build and rebuild an app', () async {
|
|
// Resolve the example script path based on the package root.
|
|
final exampleFilePath = await pathFromNearestPackageConfig(
|
|
'example/web_client.dart',
|
|
);
|
|
final process = await TestProcess.start(
|
|
Platform.resolvedExecutable, ['run', exampleFilePath]);
|
|
await expectLater(process.stdout,
|
|
emitsThrough(contains('done compiling example/app/main.dart')));
|
|
process.stdin.writeln('new message');
|
|
await expectLater(
|
|
process.stdout,
|
|
emitsThrough(
|
|
contains('Recompile succeeded for example/app/main.dart')));
|
|
process.stdin.writeln('quit');
|
|
expect(await process.exitCode, 0);
|
|
});
|
|
}
|