Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robbecker-wf committed Nov 3, 2024
1 parent 71420b2 commit 7c1685d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/src/tools/webdev_serve_tool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'dart:async';
import 'dart:io';

import 'package:args/args.dart';
import 'package:dart_dev/src/utils/dart_semver_version.dart';
import 'package:io/ansi.dart';
import 'package:io/io.dart';
import 'package:logging/logging.dart';
Expand All @@ -11,6 +10,7 @@ import 'package:pub_semver/pub_semver.dart';
import '../dart_dev_tool.dart';
import '../utils/arg_results_utils.dart';
import '../utils/assert_no_positional_args_nor_args_after_separator.dart';
import '../utils/dart_semver_version.dart';
import '../utils/executables.dart' as exe;
import '../utils/global_package_is_active_and_compatible.dart';
import '../utils/logging.dart';
Expand Down
6 changes: 4 additions & 2 deletions test/tools/webdev_serve_tool_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:args/args.dart';
import 'package:args/command_runner.dart';
import 'package:dart_dev/src/dart_dev_tool.dart';
import 'package:dart_dev/src/tools/webdev_serve_tool.dart';
import 'package:dart_dev/src/utils/dart_semver_version.dart';
import 'package:dart_dev/src/utils/executables.dart' as exe;
import 'package:io/ansi.dart';
import 'package:io/io.dart';
Expand Down Expand Up @@ -138,7 +139,7 @@ void main() {

setUpAll(() {
pubCacheWithWebdev = TempPubCache();
globalActivate('webdev', '^2.0.0',
globalActivate('webdev', '^${dartSemverVersion.major}.0.0',
environment: pubCacheWithWebdev.envOverride);

pubCacheWithoutWebdev = TempPubCache();
Expand Down Expand Up @@ -180,7 +181,8 @@ void main() {
Logger.root.onRecord,
emitsThrough(severeLogOf(allOf(
contains('webdev serve could not run'),
contains('dart pub global activate webdev ^2.0.0')))));
contains(
'dart pub global activate webdev ^${dartSemverVersion.major}.0.0')))));

expect(
buildExecution(DevToolExecutionContext(),
Expand Down

0 comments on commit 7c1685d

Please sign in to comment.