Chore: fix moment import in alerting tests (#22567)

* Chore: disable no-restricted-imports rule for moment

fix enterprise build

* Chore: get rid of moment, use dateTime in alerting tetst
This commit is contained in:
Alexander Zobnin 2020-03-04 15:47:23 +03:00 committed by GitHub
parent 766d8a5888
commit e1af933d4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,10 @@
import moment from 'moment';
import { dateTime } from '@grafana/data';
import { alertRulesReducer, initialState, loadAlertRules, loadedAlertRules, setSearchQuery } from './reducers';
import { AlertRuleDTO, AlertRulesState } from 'app/types';
import { reducerTester } from '../../../../test/core/redux/reducerTester';
describe('Alert rules', () => {
const newStateDate = moment()
const newStateDate = dateTime()
.subtract(1, 'y')
.format('YYYY-MM-DD');
const payload: AlertRuleDTO[] = [