formatting
This commit is contained in:
@@ -33,10 +33,7 @@ import {
|
||||
Trendline,
|
||||
UnlabeledDataflowData,
|
||||
} from '../types';
|
||||
import {
|
||||
ProjectGrowthAlert,
|
||||
UnlabeledDataflowAlert
|
||||
} from '../utils/alerts';
|
||||
import { ProjectGrowthAlert, UnlabeledDataflowAlert } from '../utils/alerts';
|
||||
import {
|
||||
DEFAULT_DATE_FORMAT,
|
||||
exclusiveEndDateOf,
|
||||
|
||||
@@ -37,10 +37,10 @@ const MockContext = ({
|
||||
currency: Currency;
|
||||
engineerCost: number;
|
||||
}>) => (
|
||||
<MockConfigProvider engineerCost={engineerCost}>
|
||||
<MockCurrencyProvider currency={currency}>{children}</MockCurrencyProvider>
|
||||
</MockConfigProvider>
|
||||
);
|
||||
<MockConfigProvider engineerCost={engineerCost}>
|
||||
<MockCurrencyProvider currency={currency}>{children}</MockCurrencyProvider>
|
||||
</MockConfigProvider>
|
||||
);
|
||||
|
||||
describe.each`
|
||||
engineerCost | ratio | amount | expected
|
||||
|
||||
+3
-2
@@ -31,8 +31,9 @@ export const ProjectGrowthAlertCard = ({ alert }: ProjectGrowthAlertProps) => {
|
||||
const [costStart, costEnd] = alert.aggregation;
|
||||
|
||||
const subheader = `
|
||||
${alert.products.length} ${pluralOf(alert.products.length, 'product')}${alert.products.length > 1 ? ', sorted by cost' : ''
|
||||
}`;
|
||||
${alert.products.length} ${pluralOf(alert.products.length, 'product')}${
|
||||
alert.products.length > 1 ? ', sorted by cost' : ''
|
||||
}`;
|
||||
const previousName = moment(alert.periodStart, 'YYYY-[Q]Q').format(
|
||||
'[Q]Q YYYY',
|
||||
);
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Copyright 2020 Spotify AB
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Alert, UnlabeledDataflowData, ProjectGrowthData } from '../types';
|
||||
import { UnlabeledDataflowAlertCard } from '../components/UnlabeledDataflowAlertCard';
|
||||
|
||||
@@ -16,10 +16,7 @@
|
||||
|
||||
import moment from 'moment';
|
||||
import { Duration } from '../types';
|
||||
import {
|
||||
inclusiveEndDateOf,
|
||||
inclusiveStartDateOf,
|
||||
} from '../utils/duration';
|
||||
import { inclusiveEndDateOf, inclusiveStartDateOf } from '../utils/duration';
|
||||
import { pluralOf } from '../utils/grammar';
|
||||
|
||||
export type Period = {
|
||||
|
||||
Reference in New Issue
Block a user