diff --git a/packages/sora_builder/lib/actions/test.dart b/packages/sora_builder/lib/actions/test.dart index 0008898..7da497b 100644 --- a/packages/sora_builder/lib/actions/test.dart +++ b/packages/sora_builder/lib/actions/test.dart @@ -25,6 +25,10 @@ class SoraTester { final Map> mangaResults = >{}; + Future initialize() async { + await TenkaDevEnvironment.prepare(); + } + Future test() async { for (final SoraAnimeModule x in modules.anime) { final TenkaMetadata config = await x.config(); @@ -38,6 +42,11 @@ class SoraTester { final MockedMangaExtractor mocked = x.mock(); await _test(TenkaType.manga, source, () => mocked.run(source)); } + await _summarize(); + } + + Future dispose() async { + await TenkaDevEnvironment.dispose(); } Future _test( @@ -61,7 +70,7 @@ class SoraTester { print('Tested: $k'); } - Future finish() async { + Future _summarize() async { print( 'Full Summary: [${Colorize('+$passed').green()} ${Colorize('-$failed').red()}]', ); diff --git a/store/helpers/mono_test.dart b/store/helpers/mono_test.dart index 4224ec8..da592b6 100644 --- a/store/helpers/mono_test.dart +++ b/store/helpers/mono_test.dart @@ -16,6 +16,7 @@ Future $test(final SoraBaseModule module) async { paths: $paths, urls: $urls, ); + await tester.initialize(); await tester.test(); - await tester.finish(); + await tester.dispose(); } diff --git a/store/test.dart b/store/test.dart index e01152a..8206816 100644 --- a/store/test.dart +++ b/store/test.dart @@ -9,6 +9,7 @@ Future main(final List args) async { paths: $paths, urls: $urls, ); + await tester.initialize(); await tester.test(); - await tester.finish(); + await tester.dispose(); }