-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(javascript): add requester-testing package #3684
Conversation
✔️ Code generated!
📊 Benchmark resultsBenchmarks performed on the method using a mock server, the results might not reflect the real-world performance.
|
@@ -19,34 +19,29 @@ | |||
"types": { | |||
"import": "./dist/common.d.ts", | |||
"module": "./dist/common.d.ts", | |||
"require": "./dist/common.d.cts", | |||
"default": "./dist/common.d.cts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a lefover, tsup warns when having a default
with import
and require
saying that it would never be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huuuge
@@ -317,19 +325,22 @@ describe('search with legacy signature', () => { | |||
expect(req.data).toEqual({ | |||
requests: [{ indexName: 'theIndexName', hitsPerPage: 42 }], | |||
}); | |||
expect(req.searchParams).toStrictEqual(undefined); | |||
expect(req.searchParams).toStrictEqual({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this change expected ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gggg
…skip ci] Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
algolia/api-clients-automation#3684 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
🧭 What and Why
🎟 JIRA Ticket: https://algolia.atlassian.net/browse/DI-2853 https://algolia.atlassian.net/browse/DI-2889
close algolia/algoliasearch-client-javascript#1547
Changes included:
The echo requesters we expose for internal testing purposes contains environment dependant imports (e.g. URL), which lead the clients to be unusable if the user environment doesn't support it
We now have a new private
@algolia/requester-testing
package, that isn't shipped with the clients and will be used for our test suites, which also allows the@algolia/client-common
package to be agnostic.Jest to Vitest
I've moved the
requester-*
/client-common
/algoliasearch
manual tests tovitest
, sincejest
is unable to run esm code (or I didn't managed to?), I wanted to do that since a long time, CTS is next on the list!The
clients/algoliasearch-client-javascript/packages/algoliasearch/__tests__/algoliasearch.common.test.ts
suite also runs on the browser bundle now, since the CTS runs on node only, it gives us a bit more safety for potential regressions