Skip to content

Conversation

@zastrowm
Copy link
Member

@zastrowm zastrowm commented Dec 9, 2025

In order to better share code between browser and node integ tests, use a single implementation for creating clients. We accomplish this by taking advantage of vitest's global-setup which can pass/provide information to the tests regardless of what environment they're running in - we thus provide the credentials in global setup to the tests, which can then access the credentials in both environments.

Per the last PR (#337), I also unified the skipping & logic of creating clients making it much more standard how we'll write tests going forward.

Notes

  • I also enable all logs when running tests in CI/CD
  • I moved test setup into the __fixtures__ folder for better code organization
  • Added test time out to 60s

Follow-up

A follow-up PR is planned to run more tests in both the browser & node; this gets us one step closer

In order to better share code between browser and node integ tests, use a single implementation for creating clients and inside of the factory methods, do the conditional check for what environment we're running in.

As part of this I refactored the setup to take advantage of vitest features of having the global setup inject data into the running tests - including whether we're running in the browser and if we're running in CI/CD.
@zastrowm zastrowm changed the title Unify bedrock & openai client creation Unify bedrock & openai client creation for integ tests Dec 9, 2025
@zastrowm zastrowm marked this pull request as ready for review December 9, 2025 16:46
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.

1 participant