Skip to content

Conversation

@lowet84
Copy link
Contributor

@lowet84 lowet84 commented Oct 22, 2024

Changes

Server actions was using the url "/_actions/command" despite setting a base url.
If base is set to "/base" url should be "/base/_actions/command"

Updated how actions parse action-name
Updated "actions.mjs" to include base path in the client.

Testing

Updated all tests in actions to include a base path in the fixture as. well as a base path in the tests.

Docs

Docs probably don't need changing.

@changeset-bot
Copy link

changeset-bot bot commented Oct 22, 2024

⚠️ No Changeset found

Latest commit: c143f06

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Oct 22, 2024
@ematipico
Copy link
Member

Updated all tests in actions to include a base path in the fixture as. well as a base path in the tests.

I believe there's no need to update all tests. I believe you can create one new test where you set a custom base.

@lowet84
Copy link
Contributor Author

lowet84 commented Oct 22, 2024

What I would actually like to do is to run all the existing tests with both base and no base. I managed to get one of the tests to fail during dev and that spooked me a bit. I'll look for a suitable simplification of the tests.

@lowet84
Copy link
Contributor Author

lowet84 commented Oct 22, 2024

I moved the base path test to a separate test. If you believe this is sufficient, that's fine but I'm a bit worried that all functionality is not being tested using base path.

@ematipico
Copy link
Member

I moved the base path test to a separate test. If you believe this is sufficient, that's fine but I'm a bit worried that all functionality is not being tested using base path.

Then create new tests with the functionality you want to tests. If you move all tests to use the base, you get the opposite result: all is tested with the base, and none is tested without the base.

@ematipico ematipico merged commit ea85546 into withastro:main Oct 30, 2024
13 checks passed
ematipico added a commit that referenced this pull request Oct 30, 2024
ematipico added a commit that referenced this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants