
* Add SaleorApp class * Add middleware and tests * Move APL validation to APL * Fix test * Add prepush hook * Add better error for missing vercel envs * Add test
22 lines
493 B
TypeScript
22 lines
493 B
TypeScript
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
|
|
import { FileAPL } from "./APL";
|
|
import { SaleorApp } from "./saleor-app";
|
|
|
|
describe("SaleorApp", () => {
|
|
const initialEnv = { ...process.env };
|
|
|
|
afterEach(() => {
|
|
process.env = { ...initialEnv };
|
|
vi.resetModules();
|
|
});
|
|
|
|
it("Constructs", () => {
|
|
const instance = new SaleorApp({
|
|
apl: new FileAPL(),
|
|
});
|
|
|
|
expect(instance).toBeDefined();
|
|
expect(instance.apl).toBeInstanceOf(FileAPL);
|
|
});
|
|
});
|