import { createOptions, TestProjectId, TestTokens, setupTokens } from '../test.config'; import { XunFengSysService } from '../api/xunFengSys.service'; jest.setTimeout(10000); const factory = createOptions(); const service = new XunFengSysService(factory); const programId = 'DS20171018'; const deviceId = '123'; beforeAll(async () => { await setupTokens(); // console.log(TestTokens); }); test('亮点工程添加', async () => { const counts = await service.loadAddBrightSpotEngineering(TestProjectId,'2019-08-26', '1', '1', 'nihao', 'https://private-iot-glodon.oss-cn-beijing.aliyuncs.com/gss-test/e986eb5f-bb54-4cb7-b9d3-40cd3d5e7277/timg (4).jpg'); console.log(counts); expect(counts).not.toBeNull(); }); test('亮点工程查询', async () => { const counts = await service.loadSearchBrightSpotEngineering(TestProjectId,'2019-08-25','2019-09-08','1','1'); console.log(counts); expect(counts).not.toBeNull(); }); test('亮点工程修改', async () => { const counts = await service.loadRevampBrightSpotEngineering(TestProjectId,'2019-08-26', '1', '1', 'nihao', 'https://private-iot-glodon.oss-cn-beijing.aliyuncs.com/gss-test/e986eb5f-bb54-4cb7-b9d3-40cd3d5e7277/timg (4).jpg', '1'); console.log(counts); expect(counts).not.toBeNull(); }); test('亮点工程删除', async () => { const counts = await service.loadRemoveBrightSpotEngineering(TestProjectId, '1'); console.log(counts); expect(counts).not.toBeNull(); });