Fix tests for isize (w/ deps bump) (#5562)

This commit is contained in:
Jaco
2023-03-24 13:56:55 +02:00
committed by GitHub
parent 6ce7deb1df
commit 7366fc201d
8 changed files with 112 additions and 145 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ describe('Code', (): void => {
).not.toThrow();
});
it.only('can construct with an .contract ABI (v1)', (): void => {
it('can construct with an .contract ABI (v1)', (): void => {
expect(
() => new Code(mockApi, v1contractFlipper as Record<string, unknown>, null, toPromiseMethod)
).not.toThrow();
+2 -2
View File
@@ -35,9 +35,9 @@
"tslib": "^2.5.0"
},
"devDependencies": {
"@substrate/connect": "0.7.21"
"@substrate/connect": "0.7.22"
},
"optionalDependencies": {
"@substrate/connect": "0.7.21"
"@substrate/connect": "0.7.22"
}
}
+1 -1
View File
@@ -46,6 +46,6 @@
},
"devDependencies": {
"@types/websocket": "^1.0.5",
"@types/yargs": "^17.0.22"
"@types/yargs": "^17.0.23"
}
}
+1 -1
View File
@@ -16,6 +16,6 @@ export class isize extends i32 {
constructor (registry: Registry, value?: unknown) {
super(registry, value);
throw new Error('The `osize` type should not be used. Since it is platform-specific, it creates incompatibilities between native (generally i64) and WASM (always i32) code. Use one of the `i32` or `i64` types explicitly.');
throw new Error('The `isize` type should not be used. Since it is platform-specific, it creates incompatibilities between native (generally i64) and WASM (always i32) code. Use one of the `i32` or `i64` types explicitly.');
}
}
@@ -37,7 +37,7 @@ describe('ExtrinsicEra', (): void => {
expect(extrinsicEra.asMortalEra.phase.toNumber()).toEqual(120);
});
it.only('serializes and de-serializes from JSON', (): void => {
it('serializes and de-serializes from JSON', (): void => {
const extrinsicEra = new ExtrinsicEra(registry, new Uint8Array([78, 156]));
const u8a = extrinsicEra.toU8a();
const json = extrinsicEra.toJSON();
+1
View File
@@ -20,6 +20,7 @@ const UNCONSTRUCTABLE = [
'DoNotConstruct',
'MetadataAll',
'Origin',
'isize',
'usize'
].map((v): string => v.toLowerCase());