Skip to content

Commit 81f6393

Browse files
authored
feat(scf): optimize deploy flow (#204)
* feat(scf): optimize deploy flow * test: remove metrics snapshot match
1 parent 067a8d7 commit 81f6393

File tree

12 files changed

+712
-844
lines changed

12 files changed

+712
-844
lines changed

__tests__/__snapshots__/metrics.test.ts.snap

Lines changed: 0 additions & 364 deletions
This file was deleted.

__tests__/metrics.test.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
import moment from 'moment';
22
import { Metrics } from '../src';
33

4-
function format<T>(obj: T): void {
5-
if (Array.isArray(obj)) {
6-
(obj as Array<any>).sort();
7-
for (const v of obj) {
8-
format(v);
9-
}
10-
}
11-
12-
if (typeof obj === 'object') {
13-
if (obj['type'] === 'timestamp') {
14-
obj['values'] = [];
15-
}
16-
for (const v of Object.values(obj)) {
17-
format(v);
18-
}
19-
}
20-
}
21-
224
describe('Metrics', () => {
235
const credentials = {
246
SecretId: process.env.TENCENT_SECRET_ID,
@@ -38,8 +20,5 @@ describe('Metrics', () => {
3820
rangeEnd: moment(rangeEnd).format('YYYY-MM-DD HH:mm:ss'),
3921
metrics: expect.any(Array),
4022
});
41-
42-
format(res);
43-
expect(res).toMatchSnapshot();
4423
});
4524
});

0 commit comments

Comments
 (0)