Skip to content

Commit

Permalink
fix(core,common): add array type to primitive values (fixed values) (#78
Browse files Browse the repository at this point in the history
)
  • Loading branch information
omermorad authored Jul 29, 2023
1 parent ce4c08d commit b7f57a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/common/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Type } from '@automock/types';

export type PrimitiveValue = string | number | boolean | symbol | null;
export type PrimitiveValue = unknown[] | string | number | boolean | symbol | null;

/**
* @deprecated
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/services/testbed-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export class UnitBuilder {

function isPrimitive(value: unknown): value is PrimitiveValue {
return (
Array.isArray(value) ||
typeof value === 'string' ||
typeof value === 'number' ||
typeof value === 'boolean' ||
Expand Down

0 comments on commit b7f57a1

Please sign in to comment.