Skip to content

Commit

Permalink
Merge pull request #208 from AthennaIO/develop
Browse files Browse the repository at this point in the history
update deps
  • Loading branch information
jlenon7 authored Jan 9, 2024
2 parents 3180818 + 85994a3 commit bfed4a9
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 114 deletions.
70 changes: 35 additions & 35 deletions package-lock.json

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

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/core",
"version": "4.22.0",
"version": "4.23.0",
"description": "The plug and play Node.js framework.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down Expand Up @@ -76,15 +76,15 @@
"semver": "^7.5.4"
},
"devDependencies": {
"@athenna/artisan": "^4.27.0",
"@athenna/common": "^4.26.0",
"@athenna/config": "^4.11.0",
"@athenna/http": "^4.16.0",
"@athenna/ioc": "^4.12.0",
"@athenna/logger": "^4.13.0",
"@athenna/test": "^4.17.0",
"@athenna/artisan": "^4.28.0",
"@athenna/common": "^4.27.0",
"@athenna/config": "^4.12.0",
"@athenna/http": "^4.17.0",
"@athenna/ioc": "^4.13.0",
"@athenna/logger": "^4.14.0",
"@athenna/test": "^4.18.0",
"@athenna/tsconfig": "^4.12.0",
"@athenna/view": "^4.10.0",
"@athenna/view": "^4.11.0",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"commitizen": "^4.2.6",
Expand Down
36 changes: 18 additions & 18 deletions tests/unit/applications/ConsoleTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ export default class ConsoleTest {

@Test()
public async shouldBeAbleToBootAConsoleApplicationInYourEntrypoint({ assert }: Context) {
const parseMock = Artisan.when('parse').resolve(undefined)
Artisan.when('parse').resolve(undefined)

const argv = ['node', 'artisan']
await Console.boot(argv)

assert.calledOnceWith(parseMock, argv, null)
assert.calledOnceWith(Artisan.parse, argv, null)
assert.isTrue(CommanderHandler.hasCommand('test'))
assert.isTrue(CommanderHandler.hasCommand('repl'))
assert.isTrue(CommanderHandler.hasCommand('build'))
Expand All @@ -46,12 +46,12 @@ export default class ConsoleTest {

@Test()
public async shouldBeAbleToBootAConsoleApplicationByCommandOfArgv({ assert }: Context) {
const parseMock = Artisan.when('parse').resolve(undefined)
Artisan.when('parse').resolve(undefined)

const argv = ['node', 'artisan', 'test']
await Console.boot(argv)

assert.calledOnceWith(parseMock, argv, null)
assert.calledOnceWith(Artisan.parse, argv, null)
assert.isTrue(CommanderHandler.hasCommand('test'))
assert.isFalse(CommanderHandler.hasCommand('repl'))
assert.isFalse(CommanderHandler.hasCommand('build'))
Expand All @@ -60,49 +60,49 @@ export default class ConsoleTest {

@Test()
public async shouldBeAbleToBootAConsoleApplicationWithADisplayName({ assert }: Context) {
const parseMock = Artisan.when('parse').resolve(undefined)
Artisan.when('parse').resolve(undefined)

const argv = ['node', 'artisan', 'test']
await Console.boot(argv, { displayName: 'Artisan' })

assert.calledOnceWith(parseMock, argv, 'Artisan')
assert.calledOnceWith(Artisan.parse, argv, 'Artisan')
assert.isTrue(CommanderHandler.hasCommand('test'))
}

@Test()
public async shouldBeAbleToBootAConsoleApplicationWithADifferentRoutePath({ assert }: Context) {
const parseMock = Artisan.when('parse').resolve(undefined)
Artisan.when('parse').resolve(undefined)

const argv = ['node', 'artisan']
await Console.boot(argv, { routePath: Path.fixtures('routes/console.ts') })

assert.calledOnceWith(parseMock, argv, null)
assert.calledOnceWith(Artisan.parse, argv, null)
assert.isTrue(CommanderHandler.hasCommand('route:console'))
}

@Test()
public async shouldBeAbleToBootAConsoleApplicationWithADifferentKernelPath({ assert }: Context) {
const infoMock = Log.when('info').return(undefined)
const parseMock = Artisan.when('parse').resolve(undefined)
Log.when('info').return(undefined)
Artisan.when('parse').resolve(undefined)

const argv = ['node', 'artisan']
await Console.boot(argv, { kernelPath: Path.fixtures('kernels/CustomConsoleKernel.ts') })

assert.calledOnceWith(parseMock, argv, null)
assert.calledOnceWith(infoMock, 'importing CustomConsoleKernel')
assert.calledOnceWith(Artisan.parse, argv, null)
assert.calledOnceWith(Log.info, 'importing CustomConsoleKernel')
assert.isTrue(CommanderHandler.hasCommand('test'))
}

@Test()
public async shouldBeAbleToBootAConsoleApplicationWithADifferentExceptionHandlerPath({ assert }: Context) {
const infoMock = Log.when('info').return(undefined)
const parseMock = Artisan.when('parse').resolve(undefined)
Log.when('info').return(undefined)
Artisan.when('parse').resolve(undefined)

const argv = ['node', 'artisan']
await Console.boot(argv, { exceptionHandlerPath: Path.fixtures('handlers/CustomConsoleExceptionHandler.ts') })

assert.calledOnceWith(parseMock, argv, null)
assert.calledOnceWith(infoMock, 'importing CustomConsoleExceptionHandler')
assert.calledOnceWith(Artisan.parse, argv, null)
assert.calledOnceWith(Log.info, 'importing CustomConsoleExceptionHandler')
assert.isTrue(CommanderHandler.hasCommand('test'))
}

Expand All @@ -113,12 +113,12 @@ export default class ConsoleTest {
Log.when('channelOrVanilla').return({
success: successMock
})
const parseMock = Artisan.when('parse').resolve(undefined)
Artisan.when('parse').resolve(undefined)

const argv = ['node', 'artisan']
await Console.boot(argv)

assert.calledOnceWith(parseMock, argv, null)
assert.calledOnceWith(Artisan.parse, argv, null)
assert.calledWith(successMock, 'Kernel ({yellow} ConsoleKernel) successfully booted')
assert.isTrue(CommanderHandler.hasCommand('test'))
}
Expand Down
Loading

0 comments on commit bfed4a9

Please sign in to comment.