mirror of
https://github.com/zoriya/elysia.git
synced 2026-08-15 18:44:25 +00:00
Merge branch 'main' into next
This commit is contained in:
+2
-2
@@ -617,7 +617,7 @@ export const isContextPassToFunction = (
|
||||
}
|
||||
}
|
||||
|
||||
let pendingGC: number | undefined
|
||||
let pendingGC: Timer | undefined
|
||||
let caches = <Record<number, Sucrose.Inference>>{}
|
||||
|
||||
export const clearSucroseCache = (delay: Sucrose.Settings['gcTime']) => {
|
||||
@@ -632,7 +632,7 @@ export const clearSucroseCache = (delay: Sucrose.Settings['gcTime']) => {
|
||||
|
||||
pendingGC = undefined
|
||||
if (isBun) Bun.gc(false)
|
||||
}, delay) as unknown as number
|
||||
}, delay).unref()
|
||||
}
|
||||
|
||||
export const mergeInference = (a: Sucrose.Inference, b: Sucrose.Inference) => {
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from 'bun:test'
|
||||
|
||||
describe('Integration', () => {
|
||||
it(
|
||||
'Allows process to finish',
|
||||
async () => {
|
||||
const res = Bun.spawn({
|
||||
cmd: [
|
||||
'bun',
|
||||
'-e',
|
||||
"import { Elysia } from './src'; new Elysia().onBeforeHandle(() => { });"
|
||||
]
|
||||
})
|
||||
|
||||
const status = await res.exited;
|
||||
expect(status).toEqual(0);
|
||||
},
|
||||
{
|
||||
timeout: 500
|
||||
}
|
||||
)
|
||||
})
|
||||
Reference in New Issue
Block a user