Skip to content

Fix failing tests and version solving in test fixtures - #198

Open
robbecker-wf wants to merge 2 commits into
masterfrom
fix_tests
Open

Fix failing tests and version solving in test fixtures#198
robbecker-wf wants to merge 2 commits into
masterfrom
fix_tests

Conversation

@robbecker-wf

Copy link
Copy Markdown
Member

Motivation

Several unit tests in executable_test.dart were failing:

  1. The analyzer warning test failed because ignoredPackages was subtracted from unusedDependencies before checking if analyzer was depended on, causing the warning to be skipped when analyzer was ignored.
  2. Tests asserting executable dependencies and auto-applied builders were failing pub version solving due to rigid version constraints (dart_style: ^2.3.2, build_runner: ^2.3.3, build_vm_compilers: ^1.0.3) incompatible with analyzer >=7.1.0 <15.0.0.

Changes

  • In lib/src/dependency_validator.dart, maintain rawUnusedDependencies before stripping ignoredPackages so the warning for depending on analyzer without using it is still emitted when analyzer is in ignoredPackages.
  • In test/executable_test.dart, relax build_runner, coverage, dart_style, build_test, and build_web_compilers to hostedAny in tests checking executables/builders, and replace obsolete build_vm_compilers with json_serializable (which provides an auto-applied builder).
  • Update CI workflow test-unit action reference.

Testing/QA Instructions

  • Run dart test to confirm all 97 tests pass.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread .github/workflows/ci.yaml

unit-tests:
uses: Workiva/gha-dart-oss/.github/workflows/test-unit.yaml@v0.1.14
uses: Workiva/gha-dart-oss/.github/workflows/test-unit.yaml@rob/fix-skipped-tests-fallback

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO will update this once a real release of gha-dart-oss happens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant