mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-25 22:01:32 +00:00
chore: fix build [fixes DXJ-482] (#352)
* Remove additional node targeted build * Fix test errors * Typo fix * Remove headless * Prevent JSON error * Cache json parsing * Remove resource test as it's not working in new nox * Fix test output * enable smoke tests * add puppeteer to deps * Remove headless option
This commit is contained in:
@ -53,15 +53,6 @@ export const runTest = async (): Promise<TestResult> => {
|
||||
console.log('my peer id: ', client.getPeerId());
|
||||
console.log('my sk id: ', fromByteArray(client.getPeerSecretKey()));
|
||||
|
||||
console.log('running resource test...');
|
||||
const [res, errors] = await resourceTest('my_resource');
|
||||
if (res === null) {
|
||||
console.log('resource test failed, errors', errors);
|
||||
return { type: 'failure', error: errors.join(', ') };
|
||||
} else {
|
||||
console.log('resource test finished, result', res);
|
||||
}
|
||||
|
||||
console.log('running hello test...');
|
||||
const hello = await helloTest();
|
||||
console.log('hello test finished, result: ', hello);
|
||||
@ -75,9 +66,8 @@ export const runTest = async (): Promise<TestResult> => {
|
||||
console.log('marine test finished, result: ', marine);
|
||||
|
||||
const returnVal = {
|
||||
res,
|
||||
hello,
|
||||
// marine,
|
||||
marine,
|
||||
};
|
||||
return { type: 'success', data: JSON.stringify(returnVal) };
|
||||
} finally {
|
||||
|
@ -11,7 +11,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"test_commented_out": "node --loader ts-node/esm ./src/index.ts"
|
||||
"test": "node --loader ts-node/esm ./src/index.ts"
|
||||
},
|
||||
"repository": "https://github.com/fluencelabs/fluence-js",
|
||||
"author": "Fluence Labs",
|
||||
|
@ -19,10 +19,11 @@
|
||||
"web-vitals": "2.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@test/test-utils": "workspace:^"
|
||||
"@test/test-utils": "workspace:^",
|
||||
"puppeteer": "19.7.2"
|
||||
},
|
||||
"scripts": {
|
||||
"test_commented_out": "node --loader ts-node/esm ./test/index.ts",
|
||||
"test": "node --loader ts-node/esm ./test/index.ts",
|
||||
"simulate-cdn": "http-server -p 8766 ../../../client/js-client.web.standalone/dist",
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
|
@ -19,7 +19,7 @@ const test = async () => {
|
||||
}
|
||||
|
||||
console.log('starting puppeteer...');
|
||||
const browser = await puppeteer.launch({ headless: false });
|
||||
const browser = await puppeteer.launch();
|
||||
const page = (await browser.pages())[0];
|
||||
|
||||
// uncomment to debug what's happening inside the browser
|
||||
|
@ -12,7 +12,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"simulate-cdn": "http-server -p 8765 ../../../client/js-client.web.standalone/dist",
|
||||
"test_commented_out": "node --loader ts-node/esm ./src/index.ts",
|
||||
"test": "node --loader ts-node/esm ./src/index.ts",
|
||||
"serve": "http-server public"
|
||||
},
|
||||
"repository": "https://github.com/fluencelabs/fluence-js",
|
||||
@ -22,5 +22,7 @@
|
||||
"@fluencelabs/js-client": "workspace:^",
|
||||
"@test/test-utils": "workspace:../../test-utils"
|
||||
},
|
||||
"devDependencies": {}
|
||||
"devDependencies": {
|
||||
"puppeteer": "19.7.2"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user