Files
sdk/pkg/dartdev/test/analysis_server_test.dart
T
Sam Rawlins 683ef059f5 Add a --no-plugins option to prevent analyzer plugins from running
Fixes https://github.com/dart-lang/sdk/issues/62353

Change-Id: I902badd0a7a072b98691d88ad7b382828227b1fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-01-12 11:28:17 -08:00

57 lines
1.4 KiB
Dart

// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:io' as io;
import 'package:cli_util/cli_logging.dart';
import 'package:dartdev/src/analysis_server.dart';
import 'package:dartdev/src/core.dart';
import 'package:dartdev/src/sdk.dart';
import 'package:test/test.dart';
import 'utils.dart';
void main() {
group('AnalysisServer', () {
late TestProject p;
setUp(() {
log = Logger.standard();
p = project();
});
test('can start', () async {
AnalysisServer server = AnalysisServer(
null,
io.Directory(sdk.sdkPath),
[p.dir],
commandName: 'testing',
argResults: null,
usePlugins: false,
suppressAnalytics: true,
);
await server.start();
await server.shutdown();
});
test('can send message', () async {
AnalysisServer server = AnalysisServer(
null,
io.Directory(sdk.sdkPath),
[p.dir],
commandName: 'testing',
argResults: null,
usePlugins: false,
suppressAnalytics: true,
);
await server.start();
final response = await server.getVersion();
expect(response, isNotEmpty);
await server.shutdown();
});
});
}