stock-bot/libs/core/shutdown/test/index.test.ts
2025-06-26 17:30:13 -04:00

27 lines
No EOL
1 KiB
TypeScript

import { describe, expect, it } from 'bun:test';
import * as shutdownExports from '../src';
import { Shutdown } from '../src';
describe('Shutdown Package Exports', () => {
it('should export all main functions', () => {
expect(shutdownExports.onShutdown).toBeDefined();
expect(shutdownExports.SHUTDOWN_DEFAULTS).toBeDefined();
});
it('should export Shutdown class', () => {
expect(shutdownExports.Shutdown).toBeDefined();
expect(shutdownExports.Shutdown).toBe(Shutdown);
});
it('should export correct function types', () => {
expect(typeof shutdownExports.onShutdown).toBe('function');
expect(typeof shutdownExports.SHUTDOWN_DEFAULTS).toBe('object');
});
it('should have correct SHUTDOWN_DEFAULTS values', () => {
expect(shutdownExports.SHUTDOWN_DEFAULTS).toHaveProperty('TIMEOUT');
expect(shutdownExports.SHUTDOWN_DEFAULTS).toHaveProperty('HIGH_PRIORITY');
expect(shutdownExports.SHUTDOWN_DEFAULTS).toHaveProperty('MEDIUM_PRIORITY');
expect(shutdownExports.SHUTDOWN_DEFAULTS).toHaveProperty('LOW_PRIORITY');
});
});