import { createOptions, setupTokens, TestTokens, TestProjectId } from '../test.config'; import { TechnicalService } from '../api/technical.service'; import { first } from 'lodash'; jest.setTimeout(10000); const factory = createOptions(); const service = new TechnicalService(factory); beforeAll(async () => { await setupTokens(); console.log('tokens are loaded'); console.log(TestTokens); }); test('加载配置信息', async () => { const result = await service.loadTechnology(TestProjectId, 'interpretationStatistics'); console.log('result: ', result); }); test('保存配置信息', async () => { const result = await service.saveTechnology(TestProjectId, 'interpretationStatistics', [ { baseTypeName: '交底统计', classify: '设计交底', num: 0, desc: '' }, { baseTypeName: '交底统计', classify: '施组交底', num: 1, desc: 'd' }, { baseTypeName: '交底统计', classify: '方案交底', num: 0, desc: '' }, { baseTypeName: '交底统计', classify: '技术交底', num: 0, desc: 'c' } ]); console.log('result: ', result); });