Skip to content

Commit d1a105c

Browse files
committed
test: update tests to align with increased specificity
--- 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: skipped - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - 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: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent d4710cd commit d1a105c

File tree

1 file changed

+20
-26
lines changed
  • lib/node_modules/@stdlib/ndarray/base/nullary-strided1d-dispatch-factory/docs/types

1 file changed

+20
-26
lines changed

lib/node_modules/@stdlib/ndarray/base/nullary-strided1d-dispatch-factory/docs/types/test.ts

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ import factory = require( './index' );
164164
});
165165

166166
const f = factory<unknown, number>( table, [ dtypes ], dtypes );
167-
f( x ); // $ExpectType float64ndarray
168167
f( x, o ); // $ExpectType float64ndarray
169168
}
170169

@@ -174,25 +173,28 @@ import factory = require( './index' );
174173
const table = {
175174
'default': gsorthp
176175
};
176+
const o = scalar2ndarray( 1.0, {
177+
'dtype': 'generic'
178+
});
177179

178180
const f = factory<unknown, number>( table, [ dtypes ], dtypes );
179-
f( '5' ); // $ExpectError
180-
f( 5 ); // $ExpectError
181-
f( true ); // $ExpectError
182-
f( false ); // $ExpectError
183-
f( null ); // $ExpectError
184-
f( void 0 ); // $ExpectError
185-
f( {} ); // $ExpectError
186-
f( ( x: number ): number => x ); // $ExpectError
187-
188-
f( '5', {} ); // $ExpectError
189-
f( 5, {} ); // $ExpectError
190-
f( true, {} ); // $ExpectError
191-
f( false, {} ); // $ExpectError
192-
f( null, {} ); // $ExpectError
193-
f( void 0, {} ); // $ExpectError
194-
f( {}, {} ); // $ExpectError
195-
f( ( x: number ): number => x, {} ); // $ExpectError
181+
f( '5', o ); // $ExpectError
182+
f( 5, o ); // $ExpectError
183+
f( true, o ); // $ExpectError
184+
f( false, o ); // $ExpectError
185+
f( null, o ); // $ExpectError
186+
f( void 0, o ); // $ExpectError
187+
f( {}, o ); // $ExpectError
188+
f( ( x: number ): number => x, o ); // $ExpectError
189+
190+
f( '5', o, {} ); // $ExpectError
191+
f( 5, o, {} ); // $ExpectError
192+
f( true, o, {} ); // $ExpectError
193+
f( false, o, {} ); // $ExpectError
194+
f( null, o, {} ); // $ExpectError
195+
f( void 0, o, {} ); // $ExpectError
196+
f( {}, o, {} ); // $ExpectError
197+
f( ( x: number ): number => x, o, {} ); // $ExpectError
196198
}
197199

198200
// The compiler throws an error if the returned function is provided an invalid `dims` option...
@@ -209,14 +211,6 @@ import factory = require( './index' );
209211
});
210212

211213
const f = factory<unknown, number>( table, [ dtypes ], dtypes );
212-
f( x, { 'dims': '5' } ); // $ExpectError
213-
f( x, { 'dims': 5 } ); // $ExpectError
214-
f( x, { 'dims': true } ); // $ExpectError
215-
f( x, { 'dims': false } ); // $ExpectError
216-
f( x, { 'dims': null } ); // $ExpectError
217-
f( x, { 'dims': {} } ); // $ExpectError
218-
f( x, { 'dims': ( x: number ): number => x } ); // $ExpectError
219-
220214
f( x, o, { 'dims': '5' } ); // $ExpectError
221215
f( x, o, { 'dims': 5 } ); // $ExpectError
222216
f( x, o, { 'dims': true } ); // $ExpectError

0 commit comments

Comments
 (0)