Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit 0b2f12d

Browse files
authored
feat: Cleaning up technical debts (#295)
1 parent 00b62f1 commit 0b2f12d

File tree

94 files changed

+3438
-2922
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+3438
-2922
lines changed

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
"node": ">=10",
99
"pnpm": ">=3"
1010
},
11-
"scripts": {
12-
"simulate-cdn": "http-server -p 8765 ./packages/client/js-client.web.standalone/dist"
13-
},
1411
"author": "Fluence Labs",
1512
"license": "Apache-2.0",
1613
"devDependencies": {

packages/@tests/aqua/src/index.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { fromByteArray } from 'base64-js';
22
import { Fluence } from '@fluencelabs/js-client.api';
3+
import type { ClientConfig } from '@fluencelabs/js-client.api';
34
import { kras, randomKras } from '@fluencelabs/fluence-network-environment';
45
import { registerHelloWorld, helloTest, marineTest, resourceTest } from './_aqua/smoke_test.js';
56
import { wasm } from './wasmb64.js';
@@ -11,7 +12,9 @@ import { wasm } from './wasmb64.js';
1112
// };
1213

1314
// Currently the tests executes some calls to registry. And they fail for a single local node setup. So we use kras instead.
14-
const relay = randomKras();
15+
// TODO DXJ-356: use local peers instead of kras
16+
// const relay = randomKras();
17+
const relay = kras[4];
1518

1619
function generateRandomUint8Array() {
1720
const uint8Array = new Uint8Array(32);
@@ -21,7 +24,7 @@ function generateRandomUint8Array() {
2124
return uint8Array;
2225
}
2326

24-
const optsWithRandomKeyPair = () => {
27+
const optsWithRandomKeyPair = (): ClientConfig => {
2528
return {
2629
keyPair: {
2730
type: 'Ed25519',
@@ -37,6 +40,7 @@ export const runTest = async (): Promise<TestResult> => {
3740
Fluence.onConnectionStateChange((state) => console.info('connection state changed: ', state));
3841

3942
console.log('connecting to Fluence Network...');
43+
console.log('multiaddr: ', relay.multiaddr);
4044
await Fluence.connect(relay, optsWithRandomKeyPair());
4145

4246
console.log('connected');
@@ -68,19 +72,16 @@ export const runTest = async (): Promise<TestResult> => {
6872
const hello = await helloTest();
6973
console.log('hello test finished, result: ', hello);
7074

71-
// TODO: some wired error shit about SharedArrayBuffer
72-
// console.log('running marine test...');
73-
// const marine = await marineTest(wasm);
74-
// console.log('marine test finished, result: ', marine);
75+
console.log('running marine test...');
76+
const marine = await marineTest(wasm);
77+
console.log('marine test finished, result: ', marine);
7578

7679
const returnVal = {
7780
res,
7881
hello,
7982
// marine,
8083
};
8184
return { type: 'success', data: JSON.stringify(returnVal) };
82-
} catch (err: any) {
83-
return { type: 'failure', error: err.toString() };
8485
} finally {
8586
console.log('disconnecting from Fluence Network...');
8687
await Fluence.disconnect();

packages/@tests/marine/node/.gitignore

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/@tests/marine/node/jest.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/@tests/marine/node/package.json.skip

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/@tests/marine/node/src/test.spec.ts

Lines changed: 0 additions & 54 deletions
This file was deleted.

packages/@tests/marine/node/tsconfig.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/@tests/marine/web/.gitignore

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/@tests/marine/web/index.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/@tests/marine/web/jest.config.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)