Forráskód Böngészése

Merge pull request #20884 from takahirox/WebOnlyTest

Tests: Suggestion, Introduce -webonly keyword to QUnit.module name for skipping the tests on Node.js
Mr.doob 4 éve
szülő
commit
465e1abb40
2 módosított fájl, 4 hozzáadás és 4 törlés
  1. 1 1
      test/package.json
  2. 3 3
      test/unit/src/renderers/WebGLRenderer.tests.js

+ 1 - 1
test/package.json

@@ -4,7 +4,7 @@
   "description": "This package hiding test dependincies from main repo because puppeteer is pretty big.",
   "scripts": {
     "dev": "rollup -c rollup.unit.config.js -w -m inline",
-    "unit": "rollup -c rollup.unit.config.js && rimraf node_modules/three && qunit -r failonlyreporter unit/build/three.source.unit.js"
+    "unit": "rollup -c rollup.unit.config.js && rimraf node_modules/three && qunit -r failonlyreporter -f !-webonly unit/build/three.source.unit.js"
   },
   "devDependencies": {
     "failonlyreporter": "^1.0.0",

+ 3 - 3
test/unit/src/renderers/WebGLRenderer.tests.js

@@ -456,11 +456,11 @@ var customWebGLContext = function () {
 
 export default QUnit.module( 'Renderers', () => {
 
-	QUnit.module( 'WebGLRenderer', () => {
+	QUnit.module( 'WebGLRenderer-webonly', () => {
 
-		QUnit.todo( "Instancing", ( assert ) => {
+		QUnit.test( "Instancing", ( assert ) => {
 
-			assert.ok( false, "everything's gonna be alright" );
+			assert.ok( new WebGLRenderer(), "Can instantiate a renderer." );
 
 		} );