Skip to content

Commit 8bfd0e6

Browse files
committed
fix errors
1 parent 7292543 commit 8bfd0e6

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
local entity = world._get_entity_with_test_component("CompWithDefault")
3+
local component = world.get_type_by_name("CompWithDefault")
4+
world.remove_component(entity, component)
5+
assert(world.has_component(entity, component) == false, "Component was not removed")

assets/tests/remove_component/no_component_data_errors.rhai renamed to assets/tests/remove_component/no_component_data.rhai

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
let entity = world._get_entity_with_test_component.call("CompWithDefault");
33
let component = world.get_type_by_name.call("CompWithDefault");
44

5-
assert_throws(||{
6-
world.remove_component.call(entity, component);
7-
}, "Missing type data ReflectComponent for type: .*CompWithDefault.*")
5+
world.remove_component.call(entity, component);
6+
assert(world.has_component.call(entity, component) == false, "Component was not removed");

assets/tests/remove_component/no_component_data_errors.lua

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)