mirror of
https://github.com/motajs/template.git
synced 2026-09-14 02:48:51 +08:00
style(03-08): format event guard coverage
- Restore repository CRLF and Prettier layout for the changed event files
This commit is contained in:
parent
f8cae08bd9
commit
82687b2f56
@ -228,7 +228,8 @@ describe('event built-ins', () => {
|
||||
item => item.name === EventBuiltinName.SetBlock
|
||||
);
|
||||
expect(registration).toBeDefined();
|
||||
if (!registration) throw new Error('eventSetBlock registration missing');
|
||||
if (!registration)
|
||||
throw new Error('eventSetBlock registration missing');
|
||||
await expect(
|
||||
invokeBuiltin(registration, null, fixture.env)
|
||||
).resolves.toBeUndefined();
|
||||
@ -250,7 +251,9 @@ describe('event built-ins', () => {
|
||||
expect([...fixture.layer.getMapData()]).toEqual(expectedMap);
|
||||
expect(fixture.state.hero.location.x).toBe(expectedHero.x);
|
||||
expect(fixture.state.hero.location.y).toBe(expectedHero.y);
|
||||
expect([...fixture.layer.iterateDynamicTiles()]).toHaveLength(0);
|
||||
expect([...fixture.layer.iterateDynamicTiles()]).toHaveLength(
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -117,7 +117,9 @@ type EventBuiltinHandler = (
|
||||
env: IBlockEventEnv
|
||||
) => void | Promise<void>;
|
||||
|
||||
function isBuiltinParameter(value: BuiltinParameter): value is BuiltinParameter {
|
||||
function isBuiltinParameter(
|
||||
value: BuiltinParameter
|
||||
): value is BuiltinParameter {
|
||||
return value !== null && typeof value === 'object';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user