Skip to content

Commit 59c709d

Browse files
committed
style: align ndarray/base/consensus-order test.ts with declared types
Rename the import alias `consensusLayout` to the canonical `consensusOrder` and update the `$ExpectType` annotation from `Layout` to `Order` so the type test matches the function declaration.
1 parent 40689d0 commit 59c709d

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • lib/node_modules/@stdlib/ndarray/base/consensus-order/docs/types

lib/node_modules/@stdlib/ndarray/base/consensus-order/docs/types/test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
import consensusLayout = require( './index' );
19+
import consensusOrder = require( './index' );
2020

2121

2222
// TESTS //
@@ -26,24 +26,24 @@ import consensusLayout = require( './index' );
2626
const sx = [ 2, 1 ];
2727
const sy = [ 2, 1 ];
2828
const sz = [ 4, 2 ];
29-
consensusLayout( [ sx, sy, sz ] ); // $ExpectType Layout
29+
consensusOrder( [ sx, sy, sz ] ); // $ExpectType Order
3030
}
3131

3232
// The compiler throws an error if the function is provided a first argument which is not an array-like object of numbers...
3333
{
34-
consensusLayout( true ); // $ExpectError
35-
consensusLayout( false ); // $ExpectError
36-
consensusLayout( '5' ); // $ExpectError
37-
consensusLayout( 123 ); // $ExpectError
38-
consensusLayout( {} ); // $ExpectError
39-
consensusLayout( ( x: number ): number => x ); // $ExpectError
34+
consensusOrder( true ); // $ExpectError
35+
consensusOrder( false ); // $ExpectError
36+
consensusOrder( '5' ); // $ExpectError
37+
consensusOrder( 123 ); // $ExpectError
38+
consensusOrder( {} ); // $ExpectError
39+
consensusOrder( ( x: number ): number => x ); // $ExpectError
4040
}
4141

4242
// The compiler throws an error if the function is provided an unsupported number of arguments...
4343
{
4444
const sx = [ 2, 1 ];
4545
const sy = [ 2, 1 ];
4646
const sz = [ 4, 2 ];
47-
consensusLayout(); // $ExpectError
48-
consensusLayout( [ sx, sy, sz ], [] ); // $ExpectError
47+
consensusOrder(); // $ExpectError
48+
consensusOrder( [ sx, sy, sz ], [] ); // $ExpectError
4949
}

0 commit comments

Comments
 (0)