Skip to content

Move actions tests to separate files#1929

Merged
Ekrekr merged 2 commits intomainfrom
move-action-tests-to-separate-files
Feb 20, 2025
Merged

Move actions tests to separate files#1929
Ekrekr merged 2 commits intomainfrom
move-action-tests-to-separate-files

Conversation

@Ekrekr
Copy link
Contributor

@Ekrekr Ekrekr commented Feb 20, 2025

Bit hard to review sorry, but good to get over with! All the same tests remain, apart from a duplicate test for disabled options, but just moved. Plus some shared library changes.

I also want to:

  • make these tests separate build targets, following Google standards, but I can't until resolving some circular dependencies.
  • Have config options for YAML, SQLX, and the JS API merged.

@Ekrekr Ekrekr requested a review from Ceridan February 20, 2025 12:32
@Ekrekr Ekrekr requested a review from a team as a code owner February 20, 2025 12:32
@Ekrekr Ekrekr removed the request for review from a team February 20, 2025 12:32
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please explain what is the current responsibility of main_test.ts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think pretty much everything could be moved to separate test files!

So currently it's mainly a proxy for testing session, because session doesn't really work without the code in main. But this could all moved under a session_test.ts file.

Things like SQLX testing in here are needed here because the literal JS parsing during SQLX compiling changes when passed through all the layers like this:

function compileSqlx(rootNode: SyntaxTreeNode, path: string): string {
. But they could be moved under compilers_test.ts, and call the methods in run_core.ts, like the actions tests do now.

Workflow settings could be moved to workflow_settings_test.ts, and general action configs tests could be moved to actions/index_test.ts.

image

@Ekrekr Ekrekr merged commit adbd9f7 into main Feb 20, 2025
4 checks passed
@Ekrekr Ekrekr deleted the move-action-tests-to-separate-files branch February 20, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants