Additional enum tests (#2842)

* Additional enum tests

* Adjust compare files

* Remove debug log
This commit is contained in:
Jaco Greeff
2020-11-12 14:45:32 +01:00
committed by GitHub
parent c04b63e4af
commit f810e65ea2
53 changed files with 1091 additions and 122 deletions
@@ -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;
}