mirror of
https://github.com/motajs/template.git
synced 2026-11-11 05:24:30 +08:00
fix(event): 采纳七个内建并修正 touched-jsdoc 门禁
- event.test.ts 与 03-EVENT-CONTRACT.md 同步为七个内建(移除 touchFront/EventTouchFront) - check-touched-jsdoc 按 dev.md 豁免继承/implements 成员,补充防误删说明 - 刷新 Phase 01-03 验证指纹,三个阶段恢复 passed
This commit is contained in:
1 parent
a55c2e32a2
commit
c80516deb7
6 files changed
+106
-53
No files matched your search
@@ -183,13 +183,6 @@ describe('event built-ins', () => {
|
||||
expect(fixture.state.hero.location.x).toBe(2);
|
||||
});
|
||||
|
||||
// 验证真实注册项让勇士向前一步,前方撞击判定由移动器负责
|
||||
it('steps the hero forward through touchFront', async () => {
|
||||
const fixture = createFixture();
|
||||
await invokeBuiltin(getRegistration('touchFront'), {}, fixture.env);
|
||||
expect(fixture.state.hero.location.x).toBe(1);
|
||||
});
|
||||
|
||||
// 验证真实注册项按顺序等待临时事件序列并直接执行语句体
|
||||
it('awaits id sequences and executes a direct statement body', async () => {
|
||||
const fixture = createFixture();
|
||||
@@ -227,7 +220,7 @@ describe('event built-ins', () => {
|
||||
expect(fixture.state.eventStore.getEvent('inline-body')).toBeNull();
|
||||
});
|
||||
|
||||
// 验证默认注册项只包含批准的八个稳定名称
|
||||
// 验证默认注册项只包含批准的七个稳定名称
|
||||
it('registers exactly the approved built-ins in AnonTokyo', () => {
|
||||
const fixture = createFixture();
|
||||
const names = createEventRegistrations().map(item => item.name);
|
||||
@@ -237,7 +230,6 @@ describe('event built-ins', () => {
|
||||
'removeBlock',
|
||||
'moveHero',
|
||||
'stepHero',
|
||||
'touchFront',
|
||||
'insertEvents',
|
||||
'insertEvent'
|
||||
]);
|
||||
@@ -276,9 +268,6 @@ describe('event built-ins', () => {
|
||||
missingEnv
|
||||
)
|
||||
).resolves.toBeUndefined();
|
||||
await expect(
|
||||
invokeBuiltin(getRegistration('touchFront'), {}, missingEnv)
|
||||
).resolves.toBeUndefined();
|
||||
await expect(
|
||||
invokeBuiltin(getRegistration('insertEvent'), [], fixture.env)
|
||||
).resolves.toBeUndefined();
|
||||
@@ -286,17 +275,16 @@ describe('event built-ins', () => {
|
||||
});
|
||||
|
||||
describe('event registration ownership', () => {
|
||||
// 验证单一注册函数按地图勇士控制三类顺序返回全部八个新鲜实例
|
||||
it('returns the eight fresh registrations in stable category order', () => {
|
||||
// 验证单一注册函数按地图勇士控制三类顺序返回全部七个新鲜实例
|
||||
it('returns the seven fresh registrations in stable category order', () => {
|
||||
const registrations = createEventRegistrations();
|
||||
expect(registrations).toHaveLength(8);
|
||||
expect(registrations).toHaveLength(7);
|
||||
expect(registrations.map(item => item.name)).toEqual([
|
||||
'setBlock',
|
||||
'moveBlock',
|
||||
'removeBlock',
|
||||
'moveHero',
|
||||
'stepHero',
|
||||
'touchFront',
|
||||
'insertEvents',
|
||||
'insertEvent'
|
||||
]);
|
||||
@@ -348,7 +336,6 @@ describe('event registration ownership', () => {
|
||||
'EventRemoveBlock',
|
||||
'EventMoveHero',
|
||||
'EventStepHero',
|
||||
'EventTouchFront',
|
||||
'EventInsertEvents',
|
||||
'EventInsertEvent'
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user