Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-jonathan committed Apr 15, 2024
1 parent 858f394 commit ad74278
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion __tests__/Entity.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('Entity', () => {
e1.name = ''
expect(true).toBeFalsy()
}
catch(error) {
catch (error) {
if (error instanceof ValueError) {
expect(error.name).toBe('ValueError')
expect(error.message).toBe('name is invalid')
Expand Down
4 changes: 2 additions & 2 deletions __tests__/Value.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('Value', () => {
createVersionValue(0)
expect(true).toBeFalsy()
}
catch(error) {
catch (error) {
if (error instanceof ValueError) {
expect(error.name, 'ValueError')
expect(error.message, 'value is invalid')
Expand All @@ -97,7 +97,7 @@ describe('Value', () => {
createEmail('123')
expect(true).toBeFalsy()
}
catch(error) {
catch (error) {
if (error instanceof ValidationError) {
expect(error.name, 'ValidationError')
expect(error.message, 'email is invalid')
Expand Down
2 changes: 1 addition & 1 deletion src/Entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function createEntity<E extends Entity>(target: E, handler: EntityLifecycle<E> =
return entity
}
}
catch(error) {
catch (error) {
if (error instanceof ValueError) {
handler.error?.(error)
}
Expand Down
2 changes: 1 addition & 1 deletion src/Value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function createValue<V extends Value<ValueTypeFor<V>>>(target: V, value: ValueTy

return vo
}
catch(error) {
catch (error) {
if (error instanceof ValueError) {
handler.error?.(error)
}
Expand Down

0 comments on commit ad74278

Please sign in to comment.