mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
fix
This commit is contained in:
parent
fbd38d2e5a
commit
3afecc0c18
@ -15,7 +15,6 @@ export async function validateAlias(alias: string): Promise<true> {
|
||||
logger.warn('invalid alias', alias, (err as ZodError).errors)
|
||||
throw new Error((err as ZodError).errors[0].message)
|
||||
}
|
||||
console.log(err)
|
||||
throw err
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
export * from './schema'
|
||||
export * from './enum'
|
||||
export * from './logic'
|
||||
export * from './logic/decay'
|
||||
|
||||
@ -10,6 +10,7 @@ describe('utils/decay', () => {
|
||||
// TODO: toString() was required, we could not compare two decimals
|
||||
expect(decayFormula(amount, seconds).toString()).toBe('0.999999978035040489732012')
|
||||
})
|
||||
|
||||
it('has correct backward calculation', () => {
|
||||
const amount = new Decimal(1.0)
|
||||
const seconds = -1
|
||||
@ -25,6 +26,7 @@ describe('utils/decay', () => {
|
||||
expect(decayFormula(amount, seconds).toString()).toBe('1.0')
|
||||
})
|
||||
})
|
||||
|
||||
it('has base 0.99999997802044727', () => {
|
||||
const now = new Date()
|
||||
now.setSeconds(1)
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import { LOG4JS_BASE_CATEGORY_NAME } from '../const'
|
||||
|
||||
export const LOG4JS_LOGIC_CATEGORY = `${LOG4JS_BASE_CATEGORY_NAME}.logic`
|
||||
export { calculateDecay, Decay } from './decay'
|
||||
Loading…
x
Reference in New Issue
Block a user