Unverified Commit f3315958 authored by Andrey Azov's avatar Andrey Azov Committed by GitHub
Browse files

Fix tests requiring mock product (#743)

parent e0963c5b
Pipeline #273184 passed with stages
in 9 minutes and 58 seconds
...@@ -27,7 +27,7 @@ import { ...@@ -27,7 +27,7 @@ import {
export const createProduct = (fragment: Partial<Product> = {}): Product => { export const createProduct = (fragment: Partial<Product> = {}): Product => {
const length = const length =
fragment?.length || faker.datatype.number({ min: 10, max: 100 }); fragment?.length || faker.datatype.number({ min: 50, max: 100 });
const unversionedStableId = faker.datatype.uuid(); const unversionedStableId = faker.datatype.uuid();
const version = 1; const version = 1;
const stableId = `${unversionedStableId}.${version}`; const stableId = `${unversionedStableId}.${version}`;
...@@ -54,8 +54,9 @@ const createFamilyMatches = (proteinLength: number): FamilyMatch[] => { ...@@ -54,8 +54,9 @@ const createFamilyMatches = (proteinLength: number): FamilyMatch[] => {
return times(numberOfDomains, (index: number) => { return times(numberOfDomains, (index: number) => {
const minCoordinate = maxDomainLength * index + 1; const minCoordinate = maxDomainLength * index + 1;
const maxCoordinate = maxDomainLength * (index + 1); const maxCoordinate = maxDomainLength * (index + 1);
const middleCoordinate = const middleCoordinate = Math.floor(
maxCoordinate - (maxCoordinate - minCoordinate) / 2; maxCoordinate - (maxCoordinate - minCoordinate) / 2
);
const start = faker.datatype.number({ const start = faker.datatype.number({
min: minCoordinate, min: minCoordinate,
max: middleCoordinate max: middleCoordinate
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment