From 766d086fbb85d9e04df1981507ae1ce05d2974eb Mon Sep 17 00:00:00 2001 From: zxx43 Date: Sat, 18 Jun 2022 14:10:07 +0800 Subject: [PATCH] V3.6.0 add particle material test case (#11597) * add particle material test case * add game stop --- tests/particle/material.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/particle/material.test.ts diff --git a/tests/particle/material.test.ts b/tests/particle/material.test.ts new file mode 100644 index 0000000000..1ec8fccc28 --- /dev/null +++ b/tests/particle/material.test.ts @@ -0,0 +1,16 @@ +import { director, Node, Scene } from "../../cocos/core"; +import { legacyCC } from "../../cocos/core/global-exports"; +import { ParticleSystem } from "../../exports/particle"; + +test('particle system material test', function () { + const scene = new Scene('test'); + director.runSceneImmediate(scene); + + const temp0 = new Node(); + scene.addChild(temp0); + + const particle = temp0.addComponent(ParticleSystem) as ParticleSystem; + expect(particle.sharedMaterials).toBeDefined(); + + legacyCC.game.step(); +}); \ No newline at end of file