-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
> https://github.com/eggjs/tegg/pull/242/files * 🤖 Updated the duplicate class name, fix the error when dev. ------ > https://github.com/eggjs/tegg/pull/242/files * 🤖 修改同名 class 名称定义,修复本地启动报错 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced clarity in event handling by renaming various package-related event classes for better understanding. - **Bug Fixes** - Updated test cases to reflect the renamed event classes, ensuring accurate functionality in the testing framework. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
7 changed files
with
34 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
import { PackageVersionAdded } from '../../../app/core/event/ChangesStream'; | ||
import { PackageVersionAddedChangesStreamEvent } from '../../../app/core/event/ChangesStream'; | ||
import { app, mock } from 'egg-mock/bootstrap'; | ||
|
||
describe('test/core/event/BugVersionFixHandler.test.ts', () => { | ||
let packageVersionAdded: PackageVersionAdded; | ||
let packageVersionAddedChangesStreamEvent: PackageVersionAddedChangesStreamEvent; | ||
|
||
before(async () => { | ||
packageVersionAdded = await app.getEggObject(PackageVersionAdded); | ||
packageVersionAddedChangesStreamEvent = await app.getEggObject(PackageVersionAddedChangesStreamEvent); | ||
}); | ||
|
||
it('should trigger hook', async () => { | ||
app.mockLog(); | ||
mock(app.config.cnpmcore, 'hookEnable', true); | ||
await packageVersionAdded.handle('banana', '1.0.0'); | ||
await packageVersionAddedChangesStreamEvent.handle('banana', '1.0.0'); | ||
app.expectLog(/TaskService\.createTask:new/); | ||
}); | ||
|
||
it('should ignore hook when disable', async () => { | ||
app.mockLog(); | ||
mock(app.config.cnpmcore, 'hookEnable', false); | ||
await packageVersionAdded.handle('banana', '1.0.0'); | ||
await packageVersionAddedChangesStreamEvent.handle('banana', '1.0.0'); | ||
app.notExpectLog(/TaskService\.createTask:new/); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters