Skip to content

Commit 27f1ef7

Browse files
committed
test: ensure full branch coverage
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 1908bae commit 27f1ef7

File tree

2 files changed

+5
-2
lines changed
  • lib/node_modules/@stdlib/ndarray/base/dtype-resolve-enum

2 files changed

+5
-2
lines changed

lib/node_modules/@stdlib/ndarray/base/dtype-resolve-enum/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function resolve( dtype ) {
5050
if ( t === 'string' ) {
5151
return str2enum( dtype );
5252
}
53-
if ( t === 'object' && isInteger( dtype.enum ) ) {
53+
if ( t === 'object' && dtype && isInteger( dtype.enum ) ) {
5454
return dtype.enum;
5555
}
5656
if ( isStructConstructorLike( dtype ) ) {

lib/node_modules/@stdlib/ndarray/base/dtype-resolve-enum/test/test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ tape( 'the function returns `null` if unable to resolve an enumeration constant'
155155
'bar',
156156
-99999999,
157157
-9999999999,
158-
-9999999999999
158+
-9999999999999,
159+
null,
160+
true,
161+
false
159162
];
160163
for ( i = 0; i < values.length; i++ ) {
161164
t.strictEqual( resolve( values[ i ] ), null, 'returns expected value' );

0 commit comments

Comments
 (0)