Browse Source

Merge pull request #13004 from gero3/unittests

fix unittests
Mr.doob 7 years ago
parent
commit
30d8ed2a09

+ 3 - 3
package.json

@@ -28,13 +28,13 @@
   },
   "scripts": {
     "build": "rollup -c",
-    "build-test": "rollup -c test/rollup.unit.config.js -w",
+    "build-test": "rollup -c test/rollup.unit.config.js",
     "build-uglify": "rollup -c && uglifyjs build/three.js -cm --preamble \"// threejs.org/license\" > build/three.min.js",
     "build-closure": "rollup -c && java -jar node_modules/google-closure-compiler/compiler.jar --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs utils/build/externs.js --language_in=ECMASCRIPT5_STRICT --js build/three.js --js_output_file build/three.min.js",
     "dev": "concurrently --names \"ROLLUP,HTTP\" -c \"bgBlue.bold,bgGreen.bold\" \"rollup -c -w -m inline\" \"serve --port 8080\"",
     "start": "npm run dev",
     "lint": "eslint src",
-    "test": "qunit test/unit/three.source.unit.js",
+    "test": "npm run build-test && qunit test/unit/three.source.unit.js",
     "editor": "electron ./editor/main.js"
   },
   "keywords": [
@@ -55,7 +55,7 @@
     "eslint": "^4.1.1",
     "eslint-config-mdcs": "^4.2.2",
     "google-closure-compiler": "^20170521.0.0",
-    "qunitjs": "^2.4.0",
+    "qunit": "^2.4.0",
     "rollup": "^0.51.0",
     "rollup-watch": "^4.0.0",
     "serve": "^6.3.1",

+ 3 - 3
test/unit/UnitTests.html

@@ -1,16 +1,16 @@
-<!DOCTYPE html>
+<!DOCTYPE html>
 <html>
     <head>
         <meta charset="utf-8">
         <title>ThreeJS Unit Tests - Using Files in /src</title>
-        <link rel="stylesheet" href="../../node_modules/qunitjs/qunit/qunit.css">
+        <link rel="stylesheet" href="../../node_modules/qunit/qunit/qunit.css">
     </head>
     <body>
 
         <div id="qunit"></div>
         <div id="qunit-fixture"></div>
 
-        <script src="../../node_modules/qunitjs/qunit/qunit.js"></script>
+        <script src="../../node_modules/qunit/qunit/qunit.js"></script>
 
         <!-- We need three.js because qunit-utils cannot be es6 module and use THREE stuff... -->
         <script src="../../build/three.js"></script>

+ 3 - 3
test/unit/unittests_editor_toRemoveAfterEditorES6Refactoring.html

@@ -1,16 +1,16 @@
-<!DOCTYPE html>
+<!DOCTYPE html>
 <html>
 <head>
   <meta charset="utf-8">
   <title>ThreeJS Unit Tests - Using Files in /editor</title>
-  <link rel="stylesheet" href="../../node_modules/qunitjs/qunit/qunit.css">
+  <link rel="stylesheet" href="../../node_modules/qunit/qunit/qunit.css">
 </head>
 <body>
 
   <div id="qunit"></div>
   <div id="qunit-fixture"></div>
 
-  <script src="../../node_modules/qunitjs/qunit/qunit.js"></script>
+  <script src="../../node_modules/qunit/qunit/qunit.js"></script>
   <script src="qunit-utils.js"></script>
   <script src="SmartComparer.js"></script>