-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployer.spec.ts
26 lines (24 loc) · 8.41 KB
/
deployer.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { prepareTactDeployment } from "./deployer";
const pkgB64 =
"eyJuYW1lIjoiRWNobyIsImNvZGUiOiJ0ZTZjY2dFQ0VBRUFBczBBQVJUL0FQU2tFL1M4OHNnTEFRSUJZZ0lEQXVyUUFkRFRBd0Z4c01BQmtYK1JjT0lCK2tBQklOZEpnUUVMdXZMZ2lDRFhDd29nZ3dtNklZRUUvN3F4OHVDSWd3bTY4dUNKVkZCVEEyOEUrR0VDK0dMdFJORFVBZmhqMGdBQmtqQnRqcFg0S05jTENvTUp1dkxnaVlFQkFkY0FBUUhSMnp6aVdkczhNRERJK0VNQnpIOEJ5Z0RKN1ZRTkJBSUJXQXNNQTE3dG91MzdjQ0hYU2NJZmxUQWcxd3NmM2dLU1czL2dBY0FBanhNZzEwbkNINDhMZ0NEWElkczgyengvMnpIZzNnVUlCZ0ZDeUhBQnl4OXZBQUZ2akcxdmpBSGJQRzhpQWNtVElXNnpsZ0Z2SWxuTXllZ3hEd0lLMnp6YlBIOEhDQUFLeUFIUEZza0JHbi80UW5CWUE0QkNBVzF0Mnp3SkFjN0ljUUhLQVZBSEFjb0FjQUhLQWxBRklOZEpnUUVMdXZMZ2lDRFhDd29nZ3dtNklZRUUvN3F4OHVDSWd3bTY4dUNKenhaUUEvb0NjQUhLYUNOdXN5VnVzN0dYTXpNQmNBSEtBT01OSVc2em5IOEJ5Z0FCSUc3eTBJQUJ6SlV4Y0FIS0FPTEpBZnNBQ2dDWWZ3SEtBTWh3QWNvQWNBSEtBQ1J1czUxL0Fjb0FCQ0J1OHRDQVVBVE1salFEY0FIS0FPSWtick9kZndIS0FBUWdidkxRZ0ZBRXpKWTBBM0FCeWdEaWNBSEtBQUovQWNvQUFzbFl6QUNWdTcwWUp3WE93OVhTeXVleDZF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dJQ0FnSUhKbGNHeDVLRzF6Wnk1aGMwTmxiR3dvS1NrN0NpQWdJQ0I5Q2dvZ0lDQWdaMlYwSUdaMWJpQm9aV3hzYnloemNtTTZJRk4wY21sdVp5azZJRk4wY21sdVp5QjdDaUFnSUNBZ0lDQWdiR1YwSUdKMWFXeGtaWEk2SUZOMGNtbHVaMEoxYVd4a1pYSWdQU0JpWldkcGJsTjBjbWx1WnlncE93b2dJQ0FnSUNBZ0lHSjFhV3hrWlhJdVlYQndaVzVrS0NKSVpXeHNieXdnSWlrN0NpQWdJQ0FnSUNBZ1luVnBiR1JsY2k1aGNIQmxibVFvYzNKaktUc0tJQ0FnSUNBZ0lDQnlaWFIxY200Z1luVnBiR1JsY2k1MGIxTjBjbWx1WnlncE93b2dJQ0FnZlFwOSJ9LCJjb21waWxlciI6eyJuYW1lIjoidGFjdCIsInZlcnNpb24iOiIxLjAuMC1yYy4xMyIsInBhcmFtZXRlcnMiOiJ7XCJlbnRyeXBvaW50XCI6XCIuL2V4YW1wbGVzL2VjaG8udGFjdFwiLFwib3B0aW9uc1wiOnt9fSJ9fQ==";
describe("deployer", () => {
it("should request link", async () => {
let prepared = await prepareTactDeployment({
pkg: Buffer.from(pkgB64, "base64"),
data: Buffer.from("somedddOtherpkg"),
});
expect(prepared).toBe(
"https://verifier.ton.org/tactDeployer/QmekUfWLJeggStnnyv5ib8QqjxfvjdRjVqVEBxGvaCuS8U"
);
});
it("should request link for testnet", async () => {
let prepared = await prepareTactDeployment({
pkg: Buffer.from(pkgB64, "base64"),
data: Buffer.from("somedddOtherpkg"),
testnet: true,
});
expect(prepared).toBe(
"https://verifier.ton.org/tactDeployer/QmekUfWLJeggStnnyv5ib8QqjxfvjdRjVqVEBxGvaCuS8U?testnet"
);
});
});