Skip to content

Commit

Permalink
chore: address comments and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
danisharora099 committed Oct 10, 2024
1 parent b7bdb60 commit 7e2c1cb
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 59 deletions.
39 changes: 35 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions packages/core/src/lib/filter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,8 @@ export class FilterCore extends BaseProtocol implements IBaseProtocolCore {
},
async (e) => {
log.error(
"Error with receiving pipe",
e,
" -- ",
"on peer ",
connection.remotePeer.toString(),
" -- ",
"stream ",
stream
`Error with receiving pipe on peer:${connection.remotePeer.toString()} -- stream:${stream.id} -- protocol:${stream.protocol}: `,
e
);
}
);
Expand Down
49 changes: 24 additions & 25 deletions packages/sdk/.mocharc.cjs
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
const config = {
extension: ['ts'],
spec: 'src/**/*.spec.ts',
require: ['ts-node/register', 'isomorphic-fetch'],
loader: 'ts-node/esm',
nodeOptions: [
'experimental-specifier-resolution=node',
'loader=ts-node/esm'
],
exit: true
extension: ['ts'],
spec: 'src/**/*.spec.ts',
require: ['ts-node/register', 'isomorphic-fetch'],
loader: 'ts-node/esm',
nodeOptions: [
'experimental-specifier-resolution=node',
'loader=ts-node/esm'
],
exit: true
};

if (process.env.CI) {
console.log("Running tests in parallel");
config.parallel = true;
config.jobs = 6;
console.log("Activating allure reporting");
config.reporter = 'mocha-multi-reporters';
config.reporterOptions = {
configFile: '.mocha.reporters.json'
};

if (process.env.CI) {
console.log("Running tests in parallel");
config.parallel = true;
config.jobs = 6;
console.log("Activating allure reporting");
config.reporter = 'mocha-multi-reporters';
config.reporterOptions = {
configFile: '.mocha.reporters.json'
};
} else {
console.log("Running tests serially. To enable parallel execution update mocha config");
}

module.exports = config;

} else {
console.log("Running tests serially. To enable parallel execution update mocha config");
}

module.exports = config;
8 changes: 3 additions & 5 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@
"@waku/utils": "0.0.20",
"@waku/message-hash": "0.1.16",
"async-mutex": "^0.5.0",
"libp2p": "^1.8.1",
"p-event": "^6.0.1"
"libp2p": "^1.8.1"
},
"devDependencies": {
"@types/chai": "^4.3.11",
Expand All @@ -91,8 +90,7 @@
"mocha": "^10.7.3",
"npm-run-all": "^4.1.5",
"rollup": "^4.12.0",
"sinon": "^19.0.2",
"ts-node": "^10.9.2"
"sinon": "^19.0.2"
},
"peerDependencies": {
"@libp2p/bootstrap": "^10"
Expand All @@ -112,4 +110,4 @@
"LICENSE",
"README.md"
]
}
}
Loading

0 comments on commit 7e2c1cb

Please sign in to comment.