diff --git a/packages/patrol_cli/lib/src/test_bundler.dart b/packages/patrol_cli/lib/src/test_bundler.dart index 4b2c489d9..be9f1c358 100644 --- a/packages/patrol_cli/lib/src/test_bundler.dart +++ b/packages/patrol_cli/lib/src/test_bundler.dart @@ -177,7 +177,8 @@ ${generateGroupsCode([testFilePath]).split('\n').map((e) => ' $e').join('\n')} for (final testFilePath in testFilePaths) { final relativeTestFilePath = _normalizeTestPath(testFilePath); final testName = _createTestName(relativeTestFilePath); - imports.add("import '$relativeTestFilePath' as $testName;"); + final relativeTestFilePathWithoutSlash = relativeTestFilePath[0] == '/' ? relativeTestFilePath.replaceFirst('/', '') : relativeTestFilePath; + imports.add("import '$relativeTestFilePathWithoutSlash' as $testName;"); } return imports.join('\n');