浏览代码

Tests: stub textures/Source unit tests (#25361)

* Tests: stub textures/Source unit tests

Add unit test file for textures/Source

* Docs: update textures/Source.html

Add missing property.
Ed Preston 2 年之前
父节点
当前提交
db859f13e6
共有 3 个文件被更改,包括 62 次插入0 次删除
  1. 5 0
      docs/api/en/textures/Source.html
  2. 56 0
      test/unit/src/textures/Source.tests.js
  3. 1 0
      test/unit/three.source.unit.js

+ 5 - 0
docs/api/en/textures/Source.html

@@ -27,6 +27,11 @@
 		The actual data of a texture. The type of this property depends on the texture that uses this instance.
 		</p>
 
+		<h3>[property:Boolean isSource]</h3>
+		<p>
+			Read-only flag to check if a given object is of type [name].
+		</p>
+
 		<h3>[property:Boolean needsUpdate]</h3>
 		<p>
 		Set this to `true` to trigger a data upload to the GPU next time the source is used.

+ 56 - 0
test/unit/src/textures/Source.tests.js

@@ -0,0 +1,56 @@
+/* global QUnit */
+
+// import { Source } from '../../../../src/textures/Source.js';
+
+export default QUnit.module( 'Textures', () => {
+
+	QUnit.module( 'Source', () => {
+
+		// INSTANCING
+		QUnit.todo( 'Instancing', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		// PROPERTIES
+		QUnit.todo( 'data', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'needsUpdate', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'uuid', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'version', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		// PUBLIC
+		QUnit.todo( 'isSource', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+		QUnit.todo( 'toJSON', ( assert ) => {
+
+			assert.ok( false, 'everything\'s gonna be alright' );
+
+		} );
+
+	} );
+
+} );

+ 1 - 0
test/unit/three.source.unit.js

@@ -263,5 +263,6 @@ import './src/textures/CompressedTexture.tests.js';
 import './src/textures/CubeTexture.tests.js';
 import './src/textures/DataTexture.tests.js';
 import './src/textures/DepthTexture.tests.js';
+import './src/textures/Source.tests.js';
 import './src/textures/Texture.tests.js';
 import './src/textures/VideoTexture.tests.js';