Skip to content

Commit

Permalink
refactor and install the base libraries, also try to setup a config file
Browse files Browse the repository at this point in the history
Signed-off-by: instamenta <instamenta@abv.bg>
  • Loading branch information
instamenta committed Oct 3, 2024
1 parent 26d3748 commit 1a679c6
Show file tree
Hide file tree
Showing 45 changed files with 903 additions and 860 deletions.
1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ rules:
See the License for the specific language governing permissions and
limitations under the License.
no-unused-expressions: off
no-return-assign: off
plugins: ["headers", "mocha"]
overrides:
- files: ["*.mjs"]
Expand Down
32 changes: 0 additions & 32 deletions .mocharc.js

This file was deleted.

24 changes: 24 additions & 0 deletions .mocharc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
##
# Copyright (C) 2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the ""License"");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an ""AS IS"" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##

timeout: 10000
reporter: spec
check-leaks: true
recursive: true
exclude:
- 'e2e/*'
require: [ "esm" ]
extension: [ "mjs", "js" ]
182 changes: 175 additions & 7 deletions package-lock.json

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

8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"access": "public"
},
"scripts": {
"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/*'",
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules JEST_SUITE_NAME=\"Unit Tests\" jest --runInBand --detectOpenHandles --forceExit --coverage --coverageDirectory='coverage/unit' --testPathIgnorePatterns=\".*/e2e/.*\"",
"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/.*\"",
"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.*\"",
Expand Down Expand Up @@ -61,6 +62,7 @@
"jsdoc": "^4.0.3",
"listr2": "^8.2.4",
"semver": "^7.6.3",
"sinon": "^19.0.2",
"stream-buffers": "^3.0.3",
"tar": "^7.4.3",
"uuid": "^10.0.0",
Expand All @@ -71,6 +73,12 @@
"devDependencies": {
"@jest/globals": "^29.7.0",
"@jest/test-sequencer": "^29.7.0",
"@types/chai": "^5.0.0",
"@types/chai-as-promised": "^8.0.1",
"@types/mocha": "^10.0.8",
"@types/seedrandom": "^3.0.8",
"@types/sinon": "^17.0.3",
"@types/sinon-chai": "^4.0.0",
"chai": "^5.1.1",
"chai-as-promised": "^8.0.0",
"cross-env": "^7.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/core/config_manager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { yamlToObject } from './helpers.mjs'
export class ConfigManager {
/**
* @param {SoloLogger} logger
* @param {PathLike} cachedConfigFile
* @param {string} cachedConfigFile
*/
constructor (logger, cachedConfigFile = constants.SOLO_CONFIG_FILE) {
if (!logger || !(logger instanceof SoloLogger)) throw new MissingArgumentError('An instance of core/SoloLogger is required')
Expand Down
Loading

0 comments on commit 1a679c6

Please sign in to comment.