mirror of
https://github.com/motajs/template.git
synced 2026-11-19 18:54:31 +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:
1 parent
f8cae08bd9
commit
82687b2f56
2 files changed
+8
-3
No files matched your search
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user