Skip to content

Commit

Permalink
fix literal.helpers.test.ts
Browse files Browse the repository at this point in the history
Signed-off-by: Carina Ursu <[email protected]>
  • Loading branch information
ursucarina committed Nov 11, 2024
1 parent 54ba506 commit e84fa44
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/oss-console/src/components/Literals/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ import isNil from 'lodash/isNil';
import { formatDateUTC, protobufDurationToHMS } from '../../common/formatters';
import { timestampToDate } from '../../common/utils';
import { BlobDimensionality, SchemaColumnType } from '../../models/Common/types';
import { asValueWithKind } from '../Launch/LaunchForm/inputHelpers/struct';

const DEFAULT_UNSUPPORTED = 'This type is not yet supported';


export function asValueWithKind(value: Protobuf.IValue): Protobuf.Value {
if (typeof value === 'object' && 'kind' in value) {
return value as Protobuf.Value;
}
return Protobuf.Value.create({ ...value });

Check warning on line 21 in packages/oss-console/src/components/Literals/helpers.ts

View check run for this annotation

Codecov / codecov/patch

packages/oss-console/src/components/Literals/helpers.ts#L21

Added line #L21 was not covered by tests
}

// PRIMITIVE
function processPrimitive(primitive?: (Core.IPrimitive & Pick<Core.Primitive, 'value'>) | null) {
if (!primitive) {
Expand Down

0 comments on commit e84fa44

Please sign in to comment.