Skip to content

refactor(underscore-redirects): migrate tests to typescript#16374

Open
ocavue wants to merge 2 commits intowithastro:mainfrom
ocavue-forks:ocavue-ts-test-underscore-redirects
Open

refactor(underscore-redirects): migrate tests to typescript#16374
ocavue wants to merge 2 commits intowithastro:mainfrom
ocavue-forks:ocavue-ts-test-underscore-redirects

Conversation

@ocavue
Copy link
Copy Markdown
Contributor

@ocavue ocavue commented Apr 17, 2026

Migrates packages/underscore-redirects test files from JavaScript to TypeScript.

Part of #16241

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 17, 2026

⚠️ No Changeset found

Latest commit: efed9d1

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

Comment on lines 37 to 39

assert.equal(_redirects.definitions.length, 2);
assert.equal(redirects.definitions.length, 2);
});
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't see any reason to prefix this variable with a _ so I removed it in this PR.

@ocavue ocavue marked this pull request as ready for review April 17, 2026 04:58
Comment on lines +8 to +12
const resolvedRoute1: Partial<IntegrationResolvedRoute> = {
pattern: '/',
pathname: '/',
segments: [],
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Instead of doing this, create a utility called createIntegrationRoute instead. Cleaner and doesn't need all these inline types. It's also more maintainable if we need to add new tests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in efed9d1

@ematipico
Copy link
Copy Markdown
Member

Ack, conflicts

@ocavue
Copy link
Copy Markdown
Contributor Author

ocavue commented Apr 17, 2026

Ack, conflicts

Will resolve tomorrow

@ocavue ocavue force-pushed the ocavue-ts-test-underscore-redirects branch from 33a1b4e to fc2498f Compare April 18, 2026 01:11
@ocavue
Copy link
Copy Markdown
Contributor Author

ocavue commented Apr 18, 2026

Conflicts resolved.

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