47 lines
1.4 KiB
JavaScript
47 lines
1.4 KiB
JavaScript
import { describe, it, expect, vi } from 'vitest';
|
|
import { projectAPI } from './project';
|
|
|
|
vi.mock('../../services/api');
|
|
|
|
describe('projectAPI - TC-013', () => {
|
|
beforeEach(() => {
|
|
vi.clearAllMocks();
|
|
});
|
|
|
|
it('TC-013-06: projectAPI应该有getList方法', () => {
|
|
expect(typeof projectAPI.getList).toBe('function');
|
|
});
|
|
|
|
it('TC-013-07: projectAPI应该有getDetail方法', () => {
|
|
expect(typeof projectAPI.getDetail).toBe('function');
|
|
});
|
|
|
|
it('TC-013-08: projectAPI应该有create方法', () => {
|
|
expect(typeof projectAPI.create).toBe('function');
|
|
});
|
|
|
|
it('TC-013-09: projectAPI应该有update方法', () => {
|
|
expect(typeof projectAPI.update).toBe('function');
|
|
});
|
|
|
|
it('TC-013-10: projectAPI应该有delete方法', () => {
|
|
expect(typeof projectAPI.delete).toBe('function');
|
|
});
|
|
|
|
it('TC-013-11: projectAPI应该有getStatistics方法', () => {
|
|
expect(typeof projectAPI.getStatistics).toBe('function');
|
|
});
|
|
|
|
it('TC-013-12: projectAPI应该有getGroupStatistics方法', () => {
|
|
expect(typeof projectAPI.getGroupStatistics).toBe('function');
|
|
});
|
|
|
|
it('TC-013-13: projectAPI应该有getTimelineStatistics方法', () => {
|
|
expect(typeof projectAPI.getTimelineStatistics).toBe('function');
|
|
});
|
|
|
|
it('TC-013-14: projectAPI应该有export方法', () => {
|
|
expect(typeof projectAPI.export).toBe('function');
|
|
});
|
|
});
|