Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update deps #208

Merged
merged 12 commits into from
Jan 9, 2024
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
Loading