Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions packages/jest-get-type/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,14 @@
} else if (typeof value === 'bigint') {
return 'bigint';
} else if (typeof value === 'object') {
if (value != null) {
if (value.constructor === RegExp) {
return 'regexp';
} else if (value.constructor === Map) {
return 'map';
} else if (value.constructor === Set) {
return 'set';
} else if (value.constructor === Date) {
return 'date';
}
if (value.constructor === RegExp) {
return 'regexp';

Check warning on line 45 in packages/jest-get-type/src/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/jest-get-type/src/index.ts#L45

Added line #L45 was not covered by tests
} else if (value.constructor === Map) {
return 'map';

Check warning on line 47 in packages/jest-get-type/src/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/jest-get-type/src/index.ts#L47

Added line #L47 was not covered by tests
} else if (value.constructor === Set) {
return 'set';

Check warning on line 49 in packages/jest-get-type/src/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/jest-get-type/src/index.ts#L49

Added line #L49 was not covered by tests
} else if (value.constructor === Date) {
return 'date';

Check warning on line 51 in packages/jest-get-type/src/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/jest-get-type/src/index.ts#L51

Added line #L51 was not covered by tests
}
return 'object';
} else if (typeof value === 'symbol') {
Expand Down
Loading