chore: update dependencies (#209)

This commit is contained in:
Adam Uhlíř 2022-10-26 06:45:46 -07:00 committed by GitHub
parent deb445f462
commit 0cee4ae939
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2638 additions and 6319 deletions

View File

@ -38,5 +38,11 @@ jobs:
- name: Install npm deps
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci
- name: Run node tests
- name: Run tests for older versions
if: matrix.node-version != '18.x'
run: npm test -- --bail true
- name: Run tests for Node 18
if: matrix.node-version == '18.x'
env:
NODE_OPTIONS: "--no-experimental-fetch"
run: npm test -- --bail true

View File

@ -6,6 +6,11 @@ import type { Config } from '@jest/types'
export default async (): Promise<Config.InitialOptions> => {
return {
preset: 'ts-jest',
runner: '@ethersphere/jest-serial-runner',
testRegex: 'test/integration/.*\\.spec\\.ts',
testEnvironment: 'node',
// Indicates whether the coverage information should be collected while executing the test
// collectCoverage: false,
@ -18,22 +23,9 @@ export default async (): Promise<Config.InitialOptions> => {
// An array of directory names to be searched recursively up from the requiring module's location
moduleDirectories: ['node_modules'],
// Run tests from one or more projects
projects: [
{
displayName: 'integration',
testEnvironment: 'node',
preset: 'ts-jest',
// Because of integration tests we have to run the tests serially
runner: '@codejedi365/jest-serial-runner',
testRegex: 'test/integration/.*\\.spec\\.ts',
},
] as unknown[] as string[], // bad types
// The root directory that Jest should scan for tests and modules within
rootDir: 'test',
// Increase timeout since we are spinning Bee containers
testTimeout: 4 * 60 * 1000,

8878
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -39,37 +39,37 @@
"depcheck": "depcheck ."
},
"dependencies": {
"@ethersphere/bee-js": "^4.1.1",
"chalk": "^2.4.2",
"dockerode": "^3.3.1",
"@ethersphere/bee-js": "^5.0.0",
"chalk": "^4.1.2",
"dockerode": "^3.3.4",
"furious-commander": "^1.7.1",
"node-fetch": "3.0.0-beta.9",
"ora": "^5.3.0"
},
"devDependencies": {
"@codejedi365/jest-serial-runner": "^2.0.0",
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2",
"@ethersphere/jest-serial-runner": "^1.0.0",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@fluffy-spoon/substitute": "^1.208.0",
"@jest/types": "^28.1.0",
"@types/dockerode": "^3.3.9",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.36",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.10.0",
"@jest/types": "^29.2.1",
"@types/dockerode": "^3.3.11",
"@types/jest": "^29.2.0",
"@types/node": "^18.11.3",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"depcheck": "^1.4.3",
"eslint": "^8.16.0",
"eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.4.6",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-jest": "^27.1.3",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-unused-imports": "^2.0.0",
"glob": "^8.0.3",
"jest": "^27.4.7",
"prettier": "^2.6.2",
"jest": "^29.2.1",
"jest-runner": "^29.2.1",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.4",
"ts-node": "^10.8.1",
"typescript": "^4.7.3"
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"typescript": "^4.8.4"
},
"engines": {
"node": ">=12.0.0",

View File

@ -13,7 +13,10 @@ let testFailed = false
function wrapper(fn: () => Promise<unknown>): () => Promise<unknown> {
return async () => {
try {
return await fn()
const result = await fn()
testFailed = false
return result
} catch (e) {
testFailed = true
throw e
@ -37,6 +40,10 @@ describe('start command', () => {
afterEach(async () => {
if (testFailed) {
console.log('List of containers:')
const containers = await docker.listContainers()
containers.forEach(c => console.log(` - ${c.Names.join(', ')}`))
await run(['logs', 'queen'])
}