From f13e910f67ee40821c36cd14475e33277ea8452f Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Sat, 28 Dec 2024 13:49:55 +0800 Subject: [PATCH] export Helper --- package.json | 2 +- src/index.ts | 4 ++++ test/asyncSupport.test.ts | 3 +++ test/index.test.ts | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e9cf14200e..808289315a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "egg", - "version": "4.0.0-beta.7", + "version": "4.0.0-beta.8", "engines": { "node": ">= 18.19.0" }, diff --git a/src/index.ts b/src/index.ts index 14b48d712a..64b3df5088 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,6 +4,10 @@ import { BaseContextClass } from './lib/core/base_context_class.js'; import { startEgg } from './lib/start.js'; +import Helper from './app/extend/helper.js'; + +// export extends +export { Helper }; // export types export * from './lib/egg.js'; diff --git a/test/asyncSupport.test.ts b/test/asyncSupport.test.ts index ea161337b0..7f83b758e0 100644 --- a/test/asyncSupport.test.ts +++ b/test/asyncSupport.test.ts @@ -2,6 +2,9 @@ import { strict as assert } from 'node:assert'; import { createApp, restore, MockApplication } from './utils.js'; describe('test/asyncSupport.test.ts', () => { + // Skip on Windows + if (process.platform === 'win32') return; + afterEach(restore); let app: MockApplication; before(async () => { diff --git a/test/index.test.ts b/test/index.test.ts index 775ed7b0e0..71dc78e482 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -16,6 +16,7 @@ describe('test/index.test.ts', () => { 'Controller', 'EggApplicationCore', 'EggLogger', + 'Helper', 'Master', 'Request', 'Response', @@ -26,5 +27,7 @@ describe('test/index.test.ts', () => { 'startCluster', 'startEgg', ]); + + assert(egg.Context); }); });