From 25bd8ef426a1b1d2a09dfee56858af343d9d29ac Mon Sep 17 00:00:00 2001 From: Splines Date: Wed, 29 Jan 2025 00:03:19 +0100 Subject: [PATCH] Test that windows paste patch is correctly applied --- tests/activation.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/activation.test.ts b/tests/activation.test.ts index f12a27e4..3dc0b0f6 100644 --- a/tests/activation.test.ts +++ b/tests/activation.test.ts @@ -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"; @@ -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"); + }); });