Skip to content
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

Transport options (variant B) #261

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/ts/src/testRpcCombinations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
corsHost
} from "../../hosts-config";
import {grpc} from "../../../ts/src/index";
import { fetchRequestWithOptions } from "../../../ts/src/transports/fetch";

type TestConfig = {
testHostUrl: string,
Expand Down Expand Up @@ -54,7 +55,8 @@ export function runWithHttp1AndHttp2(cb: (config: TestConfig) => void) {

export function runWithSupportedTransports(cb: (transport: grpc.TransportConstructor | undefined) => void) {
const transports: {[key: string]: grpc.TransportConstructor | undefined} = {
"defaultTransport": undefined
"defaultTransport": undefined,
"fetchWithOptions": fetchRequestWithOptions({}),
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume we may need to add this key to some test cases as well?

Copy link
Author

Choose a reason for hiding this comment

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

This seems to be used by all test cases as a way to provide transport - so it sohlud do the trick. Testing setup is rather complictaed, but seems to be prepared for testing custom transports like this. Would like a comment from @MarcusLongmuir on this.

};

if (!process.env.DISABLE_WEBSOCKET_TESTS) {
Expand Down