Porting tests over to vitest
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import * as sinon from "sinon";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
import {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { SinonStub, stub } from "sinon";
|
||||
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
import { IViewWrapper } from "@file/document-wrapper";
|
||||
@ -9,12 +8,12 @@ import * as convenienceFunctions from "@util/convenience-functions";
|
||||
import { ImageRun } from "./image-run";
|
||||
|
||||
describe("ImageRun", () => {
|
||||
before(() => {
|
||||
stub(convenienceFunctions, "uniqueId").callsFake(() => "test-unique-id");
|
||||
beforeAll(() => {
|
||||
vi.spyOn(convenienceFunctions, "uniqueId").mockReturnValue("test-unique-id");
|
||||
});
|
||||
|
||||
after(() => {
|
||||
(convenienceFunctions.uniqueId as SinonStub).restore();
|
||||
afterAll(() => {
|
||||
vi.resetAllMocks();
|
||||
});
|
||||
|
||||
describe("#constructor()", () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
import { SpaceType } from "@file/shared";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
import { BorderStyle } from "@file/border";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { assert } from "chai";
|
||||
import { assert, beforeEach, describe, it } from "vitest";
|
||||
|
||||
import { Utility } from "tests/utility";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
import { FootnoteReferenceRun } from "@file/footnotes/footnote/run/reference-run";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expect } from "chai";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
|
Reference in New Issue
Block a user