Skip to content

Commit

Permalink
Test that windows paste patch is correctly applied
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Jan 28, 2025
1 parent feadc0c commit 25bd8ef
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/activation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { window, commands, extensions } from "vscode";
import { describe, it, afterEach } from "mocha";
import * as sinon from "sinon";

import { Logger } from "../logger";

// eslint-disable-next-line no-unused-vars
import * as manimNotebook from "@src/extension";
import { onTerminalOutput } from "../src/utils/terminal";
Expand Down Expand Up @@ -43,4 +45,18 @@ describe("Manim Activation", function () {
sinon.assert.called(spy);
sinon.assert.calledWith(spy, sinon.match(MANIM_VERSION_STRING_REGEX));
});

it("Applies Windows paste patch", async function () {
if (process.platform !== "win32") {
this.skip();
}
const extension = extensions.getExtension("Manim-Notebook.manim-notebook");
if (!extension) {
throw new Error("Manim Notebook extension not found");
}

const spy = sinon.spy(Logger, "info");
await extension.activate();
sinon.assert.calledWith(spy, "Windows paste patch successfully applied");
});
});

0 comments on commit 25bd8ef

Please sign in to comment.