Skip to content

Commit e78de77

Browse files
committed
test: add missing skips for native add-on tests
--- 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: na - 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 a3a900c commit e78de77

File tree

1 file changed

+10
-7
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/normal/logpdf/test

1 file changed

+10
-7
lines changed

lib/node_modules/@stdlib/stats/base/dists/normal/logpdf/test/test.native.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,20 @@ var data = require( './fixtures/r/data.json' );
3838
// VARIABLES //
3939

4040
var logpdf = tryRequire( resolve( __dirname, './../lib/native.js' ) );
41+
var opts = {
42+
'skip': ( logpdf instanceof Error )
43+
};
4144

4245

4346
// TESTS //
4447

45-
tape( 'main export is a function', function test( t ) {
48+
tape( 'main export is a function', opts, function test( t ) {
4649
t.ok( true, __filename );
4750
t.strictEqual( typeof logpdf, 'function', 'main export is a function' );
4851
t.end();
4952
});
5053

51-
tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) {
54+
tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) {
5255
var y;
5356

5457
y = logpdf( NaN, 0.0, 1.0 );
@@ -75,19 +78,19 @@ tape( 'if provided `NaN` for any parameter, the function returns `NaN`', functio
7578
t.end();
7679
});
7780

78-
tape( 'if provided `Infinity` for `x` and a finite `mu` and `sigma`, the function returns `-Infinity`', function test( t ) {
81+
tape( 'if provided `Infinity` for `x` and a finite `mu` and `sigma`, the function returns `-Infinity`', opts, function test( t ) {
7982
var y = logpdf( PINF, 0.0, 1.0 );
8083
t.equal( y, NINF, 'returns -Infinity' );
8184
t.end();
8285
});
8386

84-
tape( 'if provided `-Infinity` for `x` and a finite `mu` and `sigma`, the function returns `-Infinity`', function test( t ) {
87+
tape( 'if provided `-Infinity` for `x` and a finite `mu` and `sigma`, the function returns `-Infinity`', opts, function test( t ) {
8588
var y = logpdf( NINF, 0.0, 1.0 );
8689
t.equal( y, NINF, 'returns -Infinity' );
8790
t.end();
8891
});
8992

90-
tape( 'if provided a negative `sigma`, the function always returns `NaN`', function test( t ) {
93+
tape( 'if provided a negative `sigma`, the function always returns `NaN`', opts, function test( t ) {
9194
var y;
9295

9396
y = logpdf( 2.0, 0.0, -1.0 );
@@ -111,7 +114,7 @@ tape( 'if provided a negative `sigma`, the function always returns `NaN`', funct
111114
t.end();
112115
});
113116

114-
tape( 'if provided `sigma` equals `0`, the function evaluates a degenerate distribution centered at `mu`', function test( t ) {
117+
tape( 'if provided `sigma` equals `0`, the function evaluates a degenerate distribution centered at `mu`', opts, function test( t ) {
115118
var y;
116119

117120
y = logpdf( 2.0, 2.0, 0.0 );
@@ -132,7 +135,7 @@ tape( 'if provided `sigma` equals `0`, the function evaluates a degenerate distr
132135
t.end();
133136
});
134137

135-
tape( 'the function evaluates the logpdf for `x` given parameters `mu` and `sigma`', function test( t ) {
138+
tape( 'the function evaluates the logpdf for `x` given parameters `mu` and `sigma`', opts, function test( t ) {
136139
var expected;
137140
var delta;
138141
var sigma;

0 commit comments

Comments
 (0)