Skip to content

The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.

730 B
Raw Blame
import { afterEach, expect, it } from "vitest";
import { windowsPty } from "./windowsPty";
import { usePlatform } from "@/platform/platformInfo";
import { useRemote } from "@/platform/remote";

const initialPlatform = usePlatform.getState();
const initialRemote = useRemote.getState();
afterEach(() => {
  useRemote.setState(initialRemote);
  usePlatform.setState(initialPlatform);
});

it.each(["linux", "windows"])("does not apply the desktop build to a remote %s PTY", (os) => {
  usePlatform.setState({ os: "windows", windowsBuildNumber: 22631 });
  useRemote.setState({
    session: { os, host: "test", root: "/repo", target: { kind: "ssh", config: "test" }, commands: [] },
  });
  expect(windowsPty()).toBeUndefined();
});