Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

756 B
Raw Blame
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
import { describe, it, expect, vi, beforeEach } from 'vitest';

vi.mock('../src/render/material', () => ({
    Material: {
        createShader: vi.fn().mockReturnValue(42),
        releaseShader: vi.fn(),
    },
}));

import { postProcessPlugin } from '../src/postprocess/PostProcessPlugin';

describe('PostProcessPlugin', () => {
    it('has correct name', () => {
        expect(postProcessPlugin.name).toBe('postProcess');
    });

    it('implements Plugin interface with build and cleanup', () => {
        expect(typeof postProcessPlugin.build).toBe('function');
        expect(typeof postProcessPlugin.cleanup).toBe('function');
    });
});