mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-10-20 18:56:29 +00:00
types: keep the metadata test helper out of the published package
metadata/util/testUtil.ts is used only by the Metadata specs, but it sat under util/ and was built and exported as @pezkuwi/types/metadata/util/testUtil. It reads fixture JSON through import.meta.url, so requiring it from the CJS build failed. It moves to metadata/test/, which the build leaves out like every other test path.
This commit is contained in:
1 parent
44a7ea4baf
commit
2a358917c7
9 files changed
+10
-10
No files matched your search
+2
-2
@@ -7,8 +7,8 @@
|
||||
|
||||
import type { Registry } from '@pezkuwi/types-codec/types';
|
||||
import type { HexString } from '@pezkuwi/util/types';
|
||||
import type { Check } from '../util/types.js';
|
||||
import type { MetaVersionAll } from '../versions.js';
|
||||
import type { Check } from './types.js';
|
||||
|
||||
import fs from 'node:fs';
|
||||
|
||||
@@ -17,7 +17,7 @@ import { hexToU8a, stringCamelCase, stringify, u8aToHex } from '@pezkuwi/util';
|
||||
import { TypeRegistry } from '../../create/index.js';
|
||||
import { unwrapStorageSi, unwrapStorageType } from '../../util/index.js';
|
||||
import { Metadata } from '../Metadata.js';
|
||||
import { getUniqTypes } from './getUniqTypes.js';
|
||||
import { getUniqTypes } from '../util/getUniqTypes.js';
|
||||
|
||||
interface MetadataJsonDef {
|
||||
lookup: unknown;
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import bizinikiwiData from '@pezkuwi/types-support/metadata/v10/bizinikiwi-hex';
|
||||
|
||||
import { testMeta } from '../util/testUtil.js';
|
||||
import { testMeta } from '../test/testUtil.js';
|
||||
|
||||
testMeta(10, {
|
||||
bizinikiwi: {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import bizinikiwiData from '@pezkuwi/types-support/metadata/v11/bizinikiwi-hex';
|
||||
|
||||
import { testMeta } from '../util/testUtil.js';
|
||||
import { testMeta } from '../test/testUtil.js';
|
||||
|
||||
testMeta(11, {
|
||||
bizinikiwi: {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import bizinikiwiData from '@pezkuwi/types-support/metadata/v12/bizinikiwi-hex';
|
||||
|
||||
import { testMeta } from '../util/testUtil.js';
|
||||
import { testMeta } from '../test/testUtil.js';
|
||||
|
||||
testMeta(12, {
|
||||
bizinikiwi: {
|
||||
|
||||
@@ -5,7 +5,7 @@ import bizinikiwiData from '@pezkuwi/types-support/metadata/v13/bizinikiwi-hex';
|
||||
import dicleData from '@pezkuwi/types-support/metadata/v13/dicle-hex';
|
||||
import pezkuwiData from '@pezkuwi/types-support/metadata/v13/pezkuwi-hex';
|
||||
|
||||
import { testMeta } from '../util/testUtil.js';
|
||||
import { testMeta } from '../test/testUtil.js';
|
||||
|
||||
testMeta(13, {
|
||||
bizinikiwi: {
|
||||
|
||||
@@ -5,7 +5,7 @@ import bizinikiwiData from '@pezkuwi/types-support/metadata/v14/bizinikiwi-hex';
|
||||
import dicleData from '@pezkuwi/types-support/metadata/v14/dicle-hex';
|
||||
import pezkuwiData from '@pezkuwi/types-support/metadata/v14/pezkuwi-hex';
|
||||
|
||||
import { testMeta } from '../util/testUtil.js';
|
||||
import { testMeta } from '../test/testUtil.js';
|
||||
|
||||
testMeta(14, {
|
||||
bizinikiwi: {
|
||||
|
||||
@@ -7,7 +7,7 @@ import bizinikiwiData from '@pezkuwi/types-support/metadata/v15/bizinikiwi-hex';
|
||||
import dicleData from '@pezkuwi/types-support/metadata/v15/dicle-hex';
|
||||
import pezkuwiData from '@pezkuwi/types-support/metadata/v15/pezkuwi-hex';
|
||||
|
||||
import { testMeta } from '../util/testUtil.js';
|
||||
import { testMeta } from '../test/testUtil.js';
|
||||
|
||||
testMeta(15, {
|
||||
'asset-hub-dicle': {
|
||||
|
||||
@@ -7,7 +7,7 @@ import dicleData from '@pezkuwi/types-support/metadata/v16/dicle-hex';
|
||||
import pezkuwiData from '@pezkuwi/types-support/metadata/v16/pezkuwi-hex';*/
|
||||
import bizinikiwiData from '@pezkuwi/types-support/metadata/v16/bizinikiwi-hex';
|
||||
|
||||
import { testMeta } from '../util/testUtil.js';
|
||||
import { testMeta } from '../test/testUtil.js';
|
||||
|
||||
// TODO: Once MetadataV16 lands in an official release, pull the
|
||||
// latest metadata for each chain and update the tests
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import bizinikiwiData from '@pezkuwi/types-support/metadata/v9/bizinikiwi-hex';
|
||||
|
||||
import { testMeta } from '../util/testUtil.js';
|
||||
import { testMeta } from '../test/testUtil.js';
|
||||
|
||||
testMeta(9, {
|
||||
bizinikiwi: {
|
||||
|
||||
Reference in new issue
Block a user