Adjust tests for node:test env (#5509)

This commit is contained in:
Jaco
2023-02-25 11:48:26 +02:00
committed by GitHub
parent beb7b54e4a
commit a8d7566186
151 changed files with 674 additions and 950 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
"version": "9.14.3-2-x",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@babel/runtime": "^7.21.0",
"@polkadot/api": "9.14.3-2-x",
"@polkadot/api-augment": "9.14.3-2-x",
"@polkadot/api-base": "9.14.3-2-x",
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import type { SubmittableExtrinsic } from '@polkadot/api-base/types';
import type { Bytes, Option, StorageKey } from '@polkadot/types';
import type { Bounty, BountyIndex, Proposal, ProposalIndex } from '@polkadot/types/interfaces';
+9 -2
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
@@ -39,7 +42,9 @@ describe('derive', (): void => {
describe('builtin', (): void => {
const api = new ApiRx({ provider: new MockProvider(registry), registry });
beforeAll(() => waitReady(api));
beforeAll(async () => {
await waitReady(api);
});
afterAll(() => api.disconnect());
testFunction(api)('accounts', 'idAndIndex', []);
@@ -82,7 +87,9 @@ describe('derive', (): void => {
throwOnConnect: true
});
beforeAll(() => waitReady(api));
beforeAll(async () => {
await waitReady(api);
});
afterAll(() => api.disconnect());
// override
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import type { ApprovalFlag } from '@polkadot/types/interfaces';
import { TypeRegistry } from '@polkadot/types/create';