Skip to content

Commit aadc221

Browse files
refactor(test): reorganize test files to mirror lib/src structure (#140)
## Description Reorganizes the test directory structure to mirror the `lib/src/` folder layout, making it easier to find and maintain tests for specific modules. ### Changes Test files have been moved/renamed to match their corresponding source files: | Before | After | |--------|-------| | `test/rum_flutter_test.dart` | `test/src/faro_test.dart` | | `test/data_collection_policy_test.dart` | `test/src/data_collection_policy_test.dart` | | `test/faro_session_attributes_test.dart` | `test/src/faro_session_attributes_test.dart` | | `test/unit_test/batch_transport_test.dart` | `test/src/transport/batch_transport_test.dart` | | `test/payload_extension_test.dart` | `test/src/util/payload_extension_test.dart` | | `test/timestamp_extension_test.dart` | `test/src/util/timestamp_extension_test.dart` | | Integration tests | `test/src/integrations/` | ## Related Issue(s) N/A - Internal code organization improvement ## Type of Change - [ ] 🛠️ Bug fix (non-breaking change which fixes an issue) - [ ] 🚀 New feature (non-breaking change which adds functionality) - [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 📝 Documentation - [ ] 📈 Performance improvement - [x] 🏗️ Code refactoring - [ ] 🧹 Chore / Housekeeping ## Checklist - [x] I have made corresponding changes to the documentation - [x] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the CHANGELOG.md under the "Unreleased" section ## Additional Notes This is a pure structural refactor - no test logic was changed, only file locations. This aligns test organization with the SDK's source structure for better maintainability. Made with [Cursor](https://cursor.com) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Test-only change adjusting an import path; no production code or logic is modified, so risk is limited to potential test compilation issues. > > **Overview** > Updates `test/src/integrations/sampling_integration_test.dart` to import `FakeRandomValueProvider` from its new location under `test/helpers/` (via `../../helpers/...`) instead of the old relative path, aligning the test with the reorganized test directory structure. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 12f35c2. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 97a55f3 commit aadc221

12 files changed

+1
-1
lines changed
File renamed without changes.
File renamed without changes.

test/unit_test/flutter_error_integration_test.dart renamed to test/src/integrations/flutter_error_integration_test.dart

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/unit_test/sampling_integration_test.dart renamed to test/src/integrations/sampling_integration_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import 'package:mocktail/mocktail.dart';
1414
import 'package:package_info_plus/package_info_plus.dart';
1515
import 'package:shared_preferences/shared_preferences.dart';
1616

17-
import '../helpers/fake_random_value_provider.dart';
17+
import '../../helpers/fake_random_value_provider.dart';
1818

1919
class MockFaroTransport extends Mock implements FaroTransport {}
2020

File renamed without changes.

0 commit comments

Comments
 (0)