import { describe, expect, it } from 'vitest'; import * as allExports from './node.js'; describe('node', () => { it('includes Node-specific exports in addition to the cross-platform ones', () => { expect(Object.keys(allExports).sort()).toMatchInlineSnapshot(` [ "AssertionError", "CAIP_ACCOUNT_ADDRESS_REGEX", "CAIP_ACCOUNT_ID_REGEX", "CAIP_ASSET_ID_REGEX", "CAIP_ASSET_NAMESPACE_REGEX", "CAIP_ASSET_REFERENCE_REGEX", "CAIP_ASSET_TYPE_REGEX", "CAIP_CHAIN_ID_REGEX", "CAIP_NAMESPACE_REGEX", "CAIP_REFERENCE_REGEX", "CAIP_TOKEN_ID_REGEX", "CaipAccountAddressStruct", "CaipAccountIdStruct", "CaipAssetIdStruct", "CaipAssetNamespaceStruct", "CaipAssetReferenceStruct", "CaipAssetTypeOrIdStruct", "CaipAssetTypeStruct", "CaipChainIdStruct", "CaipNamespaceStruct", "CaipReferenceStruct", "CaipTokenIdStruct", "ChecksumStruct", "Duration", "ESCAPE_CHARACTERS_REGEXP", "FrozenMap", "FrozenSet", "HEX_REGEX", "HexAddressStruct", "HexChecksumAddressStruct", "HexStruct", "JsonRpcErrorStruct", "JsonRpcFailureStruct", "JsonRpcIdStruct", "JsonRpcNotificationStruct", "JsonRpcParamsStruct", "JsonRpcRequestStruct", "JsonRpcResponseStruct", "JsonRpcSuccessStruct", "JsonRpcVersionStruct", "JsonSize", "JsonStruct", "KnownCaipNamespace", "PendingJsonRpcResponseStruct", "STRICT_HEX_REGEX", "StrictHexStruct", "UnsafeJsonStruct", "VersionRangeStruct", "VersionStruct", "add0x", "areUint8ArraysEqual", "assert", "assertExhaustive", "assertIsBytes", "assertIsHexString", "assertIsJsonRpcError", "assertIsJsonRpcFailure", "assertIsJsonRpcNotification", "assertIsJsonRpcRequest", "assertIsJsonRpcResponse", "assertIsJsonRpcSuccess", "assertIsPendingJsonRpcResponse", "assertIsSemVerRange", "assertIsSemVerVersion", "assertIsStrictHexString", "assertStruct", "base64", "base64ToBytes", "bigIntToBytes", "bigIntToHex", "bytesToBase64", "bytesToBigInt", "bytesToHex", "bytesToNumber", "bytesToSignedBigInt", "bytesToString", "calculateNumberSize", "calculateStringSize", "concatBytes", "convertMnemonicToWordlistIndices", "createBigInt", "createBytes", "createDataView", "createDeferredPromise", "createHex", "createModuleLogger", "createNumber", "createProjectLogger", "createSandbox", "definePattern", "directoryExists", "ensureDirectoryStructureExists", "ensureError", "exactOptional", "fileExists", "forceRemove", "fromWei", "getChecksumAddress", "getErrorMessage", "getJsonRpcIdValidator", "getJsonSize", "getKnownPropertyNames", "getSafeJson", "getValueOfUnit", "gtRange", "gtVersion", "hasProperty", "hexToBigInt", "hexToBytes", "hexToNumber", "inMilliseconds", "isASCII", "isBytes", "isCaipAccountAddress", "isCaipAccountId", "isCaipAssetId", "isCaipAssetNamespace", "isCaipAssetReference", "isCaipAssetType", "isCaipChainId", "isCaipNamespace", "isCaipReference", "isCaipTokenId", "isErrorWithCode", "isErrorWithMessage", "isErrorWithStack", "isHexAddress", "isHexChecksumAddress", "isHexString", "isJsonRpcError", "isJsonRpcFailure", "isJsonRpcNotification", "isJsonRpcRequest", "isJsonRpcResponse", "isJsonRpcSuccess", "isNonEmptyArray", "isNullOrUndefined", "isObject", "isPendingJsonRpcResponse", "isPlainObject", "isStrictHexString", "isValidChecksumAddress", "isValidHexAddress", "isValidJson", "isValidSemVerRange", "isValidSemVerVersion", "jsonrpc2", "numberToBytes", "numberToHex", "numberToString", "object", "parseCaipAccountId", "parseCaipAssetId", "parseCaipAssetType", "parseCaipChainId", "readFile", "readJsonFile", "remove0x", "satisfiesVersionRange", "sha256", "sha384", "sha512", "signedBigIntToBytes", "stringToBytes", "timeSince", "toCaipAccountId", "toCaipAssetId", "toCaipAssetType", "toCaipChainId", "toWei", "uint8ArrayToMnemonic", "unitMap", "valueToBytes", "wrapError", "writeFile", "writeJsonFile", ] `); }); });