Skip to content

Commit 1a679c6

Browse files
committed
refactor and install the base libraries, also try to setup a config file
Signed-off-by: instamenta <[email protected]>
1 parent 26d3748 commit 1a679c6

Some content is hidden

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

45 files changed

+903
-860
lines changed

Diff for: .eslintrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ rules:
2828
See the License for the specific language governing permissions and
2929
limitations under the License.
3030
no-unused-expressions: off
31+
no-return-assign: off
3132
plugins: ["headers", "mocha"]
3233
overrides:
3334
- files: ["*.mjs"]

Diff for: .mocharc.js

-32
This file was deleted.

Diff for: .mocharc.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
##
2+
# Copyright (C) 2024 Hedera Hashgraph, LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the ""License"");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an ""AS IS"" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
##
16+
17+
timeout: 10000
18+
reporter: spec
19+
check-leaks: true
20+
recursive: true
21+
exclude:
22+
- 'e2e/*'
23+
require: [ "esm" ]
24+
extension: [ "mjs", "js" ]

Diff for: package-lock.json

+175-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"access": "public"
1212
},
1313
"scripts": {
14+
"test:mocha": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Unit Tests\" mocha --recursive --timeout 10000 --exit --reporter spec --check-leaks --coverage --coverage-report=text --exclude 'test/e2e/*'",
1415
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules JEST_SUITE_NAME=\"Unit Tests\" jest --runInBand --detectOpenHandles --forceExit --coverage --coverageDirectory='coverage/unit' --testPathIgnorePatterns=\".*/e2e/.*\"",
1516
"test-e2e-all": "NODE_OPTIONS=--experimental-vm-modules JEST_SUITE_NAME='Jest E2E All Tests' JEST_JUNIT_OUTPUT_NAME='junit-e2e.xml' jest --runInBand --detectOpenHandles --forceExit --coverage --coverageDirectory='coverage/e2e' --testPathIgnorePatterns=\".*/unit/.*\"",
1617
"test-e2e-standard": "NODE_OPTIONS=--experimental-vm-modules JEST_SUITE_NAME='Jest E2E Standard Tests' JEST_JUNIT_OUTPUT_NAME='junit-e2e-standard.xml' jest --runInBand --detectOpenHandles --forceExit --coverage --coverageDirectory='coverage/e2e-standard' --testPathIgnorePatterns=\".*/unit/.*\" --testPathIgnorePatterns=\".*/e2e/commands/mirror_node.*\" --testPathIgnorePatterns=\".*/e2e/commands/node.*\" --testPathIgnorePatterns=\".*/e2e/commands/separate_node.*\" --testPathIgnorePatterns=\".*/e2e/commands/relay.*\"",
@@ -61,6 +62,7 @@
6162
"jsdoc": "^4.0.3",
6263
"listr2": "^8.2.4",
6364
"semver": "^7.6.3",
65+
"sinon": "^19.0.2",
6466
"stream-buffers": "^3.0.3",
6567
"tar": "^7.4.3",
6668
"uuid": "^10.0.0",
@@ -71,6 +73,12 @@
7173
"devDependencies": {
7274
"@jest/globals": "^29.7.0",
7375
"@jest/test-sequencer": "^29.7.0",
76+
"@types/chai": "^5.0.0",
77+
"@types/chai-as-promised": "^8.0.1",
78+
"@types/mocha": "^10.0.8",
79+
"@types/seedrandom": "^3.0.8",
80+
"@types/sinon": "^17.0.3",
81+
"@types/sinon-chai": "^4.0.0",
7482
"chai": "^5.1.1",
7583
"chai-as-promised": "^8.0.0",
7684
"cross-env": "^7.0.3",

Diff for: src/core/config_manager.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { yamlToObject } from './helpers.mjs'
3434
export class ConfigManager {
3535
/**
3636
* @param {SoloLogger} logger
37-
* @param {PathLike} cachedConfigFile
37+
* @param {string} cachedConfigFile
3838
*/
3939
constructor (logger, cachedConfigFile = constants.SOLO_CONFIG_FILE) {
4040
if (!logger || !(logger instanceof SoloLogger)) throw new MissingArgumentError('An instance of core/SoloLogger is required')

0 commit comments

Comments
 (0)