Skip to content

Commit 02ed83c

Browse files
authored
Move end-to-end tests into their own directory (#2322)
These are the TODO. These are the slow ones to migrate to be unit tests, and speed up.
1 parent 2c7f36e commit 02ed83c

6 files changed

+11
-11
lines changed

test/dartdoc_integration_test.dart renamed to test/end2end/dartdoc_integration_test.dart

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ import 'package:dartdoc/dartdoc.dart';
1212
import 'package:path/path.dart' as path;
1313
import 'package:test/test.dart';
1414

15-
import '../tool/subprocess_launcher.dart';
16-
import 'src/utils.dart';
15+
import '../../tool/subprocess_launcher.dart';
16+
import '../src/utils.dart';
1717

1818
Uri get _currentFileUri =>
1919
(reflect(main) as ClosureMirror).function.location.sourceUri;
2020
String get _testPackagePath =>
21-
path.fromUri(_currentFileUri.resolve('../testing/test_package'));
22-
String get _testPackageFlutterPluginPath => path
23-
.fromUri(_currentFileUri.resolve('../testing/test_package_flutter_plugin'));
21+
path.fromUri(_currentFileUri.resolve('../../testing/test_package'));
22+
String get _testPackageFlutterPluginPath => path.fromUri(
23+
_currentFileUri.resolve('../../testing/test_package_flutter_plugin'));
2424

2525
void main() {
2626
group('Invoking command-line dartdoc', () {
@@ -210,8 +210,8 @@ void main() {
210210
}, timeout: Timeout.factor(2));
211211

212212
test('--footer-text excludes version', () async {
213-
var _testPackagePath = path
214-
.fromUri(_currentFileUri.resolve('../testing/test_package_options'));
213+
var _testPackagePath = path.fromUri(
214+
_currentFileUri.resolve('../../testing/test_package_options'));
215215

216216
var args = <String>[dartdocPath, '--output', tempDir.path];
217217

test/dartdoc_test.dart renamed to test/end2end/dartdoc_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import 'package:dartdoc/src/warnings.dart';
1717
import 'package:path/path.dart' as path;
1818
import 'package:test/test.dart';
1919

20-
import 'src/utils.dart';
20+
import '../src/utils.dart';
2121

2222
final _resourceProvider = pubPackageMetaProvider.resourceProvider;
2323
final _pathContext = _resourceProvider.pathContext;

test/html_generator_test.dart renamed to test/end2end/html_generator_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import 'package:dartdoc/src/warnings.dart';
1616
import 'package:path/path.dart' as path;
1717
import 'package:test/test.dart';
1818

19-
import 'src/utils.dart' as utils;
19+
import '../src/utils.dart' as utils;
2020

2121
// Init a generator without a GeneratorContext and with the default file writer.
2222
Future<Generator> _initGeneratorForTest() async {

test/model_special_cases_test.dart renamed to test/end2end/model_special_cases_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import 'package:dartdoc/src/special_elements.dart';
1919
import 'package:pub_semver/pub_semver.dart';
2020
import 'package:test/test.dart';
2121

22-
import 'src/utils.dart' as utils;
22+
import '../src/utils.dart' as utils;
2323

2424
final String _platformVersionString = Platform.version.split(' ').first;
2525
final Version _platformVersion = Version.parse(_platformVersionString);

test/model_test.dart renamed to test/end2end/model_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import 'package:dartdoc/src/special_elements.dart';
1919
import 'package:dartdoc/src/warnings.dart';
2020
import 'package:test/test.dart';
2121

22-
import 'src/utils.dart' as utils;
22+
import '../src/utils.dart' as utils;
2323

2424
final _testPackageGraphMemo = AsyncMemoizer<PackageGraph>();
2525
Future<PackageGraph> get _testPackageGraph =>

0 commit comments

Comments
 (0)