文件操作 - module.test.ts
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/grafana/public/app/plugins/datasource/prometheus/module.test.ts
编辑文件内容
import { plugin as PrometheusDatasourcePlugin } from './module'; import { ANNOTATION_QUERY_STEP_DEFAULT } from './datasource'; describe('module', () => { it('should have metrics query field in panels and Explore', () => { expect(PrometheusDatasourcePlugin.components.ExploreMetricsQueryField).toBeDefined(); expect(PrometheusDatasourcePlugin.components.QueryEditor).toBeDefined(); }); it('should have stepDefaultValuePlaceholder set in annotations ctrl', () => { expect(PrometheusDatasourcePlugin.components.AnnotationsQueryCtrl).toBeDefined(); const annotationsCtrl = new PrometheusDatasourcePlugin.components.AnnotationsQueryCtrl(); expect(annotationsCtrl.stepDefaultValuePlaceholder).toEqual(ANNOTATION_QUERY_STEP_DEFAULT); }); });
修改文件时间
将文件时间修改为当前时间的前一年
删除文件