Skip to content

Commit 6171b9f

Browse files
committed
fmt
1 parent 227595b commit 6171b9f

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ bundle:
2727
deno bundle --log-level info --unstable src/mod.ts ./nats.js
2828

2929
fmt:
30-
deno fmt src/ doc/ bin/ nats-base-client/ examples/ tests/ debug/ jetstream/ jetstream.md README.md services.md
30+
deno fmt src/ doc/ bin/ nats-base-client/ examples/ tests/ debug/ unsafe_tests/ jetstream/ jetstream.md README.md services.md

unsafe_tests/tlsunsafe_test.ts

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
import {resolve} from "https://deno.land/[email protected]/path/resolve.ts";
2-
import {join} from "https://deno.land/[email protected]/path/join.ts";
3-
import {NatsServer} from "../tests/helpers/launcher.ts";
4-
import {connect} from "../src/connect.ts";
1+
import { resolve } from "https://deno.land/[email protected]/path/resolve.ts";
2+
import { join } from "https://deno.land/[email protected]/path/join.ts";
3+
import { NatsServer } from "../tests/helpers/launcher.ts";
4+
import { connect } from "../src/connect.ts";
55

66
Deno.test("tls-unsafe - handshake first", async () => {
7-
const cwd = Deno.cwd();
8-
const config = {
9-
host: "localhost",
10-
tls: {
11-
handshake_first: true,
12-
cert_file: resolve(join(cwd, "./tests/certs/localhost.crt")),
13-
key_file: resolve(join(cwd, "./tests/certs/localhost.key")),
14-
ca_file: resolve(join(cwd, "./tests/certs/RootCA.crt")),
15-
},
16-
};
7+
const cwd = Deno.cwd();
8+
const config = {
9+
host: "localhost",
10+
tls: {
11+
handshake_first: true,
12+
cert_file: resolve(join(cwd, "./tests/certs/localhost.crt")),
13+
key_file: resolve(join(cwd, "./tests/certs/localhost.key")),
14+
ca_file: resolve(join(cwd, "./tests/certs/RootCA.crt")),
15+
},
16+
};
1717

18-
const ns = await NatsServer.start(config);
19-
const nc = await connect({
20-
debug: true,
21-
servers: `localhost:${ns.port}`,
22-
tls: {
23-
handshakeFirst: true,
24-
caFile: config.tls.ca_file,
25-
},
26-
});
27-
nc.subscribe("foo", {
28-
callback(_err, msg) {
29-
msg.respond(msg.data);
30-
},
31-
});
18+
const ns = await NatsServer.start(config);
19+
const nc = await connect({
20+
debug: true,
21+
servers: `localhost:${ns.port}`,
22+
tls: {
23+
handshakeFirst: true,
24+
caFile: config.tls.ca_file,
25+
},
26+
});
27+
nc.subscribe("foo", {
28+
callback(_err, msg) {
29+
msg.respond(msg.data);
30+
},
31+
});
3232

33-
await nc.request("foo", "hello");
34-
await nc.close();
35-
await ns.stop();
33+
await nc.request("foo", "hello");
34+
await nc.close();
35+
await ns.stop();
3636
});

0 commit comments

Comments
 (0)