Additional enum tests (#2842)
* Additional enum tests * Adjust compare files * Remove debug log
This commit is contained in:
@@ -11,7 +11,7 @@ import { StorageKey } from '@polkadot/types/primitive';
|
||||
import { assert, compactAddLength, compactStripLength, isNull, isUndefined, stringLowerFirst, u8aConcat } from '@polkadot/util';
|
||||
import { xxhashAsU8a } from '@polkadot/util-crypto';
|
||||
|
||||
import getHasher, { HasherFunction } from './getHasher';
|
||||
import { HasherFunction, getHasher } from './getHasher';
|
||||
|
||||
export interface CreateItemOptions {
|
||||
key?: string;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { TypeRegistry } from '@polkadot/types/create';
|
||||
import { stringToU8a } from '@polkadot/util';
|
||||
import { xxhashAsU8a } from '@polkadot/util-crypto';
|
||||
|
||||
import getHasher from './getHasher';
|
||||
import { getHasher } from './getHasher';
|
||||
|
||||
describe('getHasher', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -30,6 +30,6 @@ const HASHERS: Record<keyof typeof AllHashers, HasherFunction> = {
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
export default function getHasher (hasher?: StorageHasher): HasherFunction {
|
||||
export function getHasher (hasher?: StorageHasher): HasherFunction {
|
||||
return HASHERS[hasher?.type as 'Identity'] || DEFAULT_FN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user