mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 06:35:24 +00:00
feat: tailscale add host and copy ip, fix outbound fetch hang and plugin ESM warning
This commit is contained in:
1 parent
c21bca8cf0
commit
fbe736bc20
70 files changed
+1117
-1139
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { registerHostProtocol } from "../../sidebar/host-protocols";
|
||||
import {
|
||||
applyHostDraft,
|
||||
createHostEditorForm,
|
||||
buildHostEditorPayload,
|
||||
omitOwnerSshAuthFromSharedEdit,
|
||||
@@ -559,3 +560,27 @@ describe("plugin protocols", () => {
|
||||
expect(payload.enableSsh).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("applyHostDraft", () => {
|
||||
it("fills a new host's form from a plugin draft", () => {
|
||||
const form = applyHostDraft(createHostEditorForm(null), {
|
||||
name: "box",
|
||||
ip: "100.64.0.1",
|
||||
port: 2222,
|
||||
username: "luke",
|
||||
authType: "tailscale",
|
||||
});
|
||||
expect(form).toMatchObject({
|
||||
name: "box",
|
||||
ip: "100.64.0.1",
|
||||
sshPort: 2222,
|
||||
username: "luke",
|
||||
authType: "tailscale",
|
||||
});
|
||||
});
|
||||
|
||||
it("leaves the form alone without a draft", () => {
|
||||
const form = createHostEditorForm(null);
|
||||
expect(applyHostDraft(form, undefined)).toBe(form);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user