Browse Source

Update browser tests

feature/aio
Jerome Wu 6 years ago
parent
commit
269629d601
  1. 28
      package-lock.json
  2. 4
      package.json
  3. 8
      tests/detect.test.html
  4. 8
      tests/recognize.test.html

28
package-lock.json generated

@ -2549,12 +2549,14 @@ @@ -2549,12 +2549,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -2569,17 +2571,20 @@ @@ -2569,17 +2571,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -2696,7 +2701,8 @@ @@ -2696,7 +2701,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -2708,6 +2714,7 @@ @@ -2708,6 +2714,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -2722,6 +2729,7 @@ @@ -2722,6 +2729,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -2729,12 +2737,14 @@ @@ -2729,12 +2737,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@ -2753,6 +2763,7 @@ @@ -2753,6 +2763,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -2833,7 +2844,8 @@ @@ -2833,7 +2844,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@ -2845,6 +2857,7 @@ @@ -2845,6 +2857,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -2966,6 +2979,7 @@ @@ -2966,6 +2979,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",

4
package.json

@ -12,8 +12,8 @@ @@ -12,8 +12,8 @@
"test:all": "npm-run-all wait test:browser:* test:node",
"test:node": "nyc mocha --exit --bail --require ./scripts/test-helper.js ./tests/*.test.js",
"test:browser-tpl": "mocha-headless-chrome -a incognito -a no-sandbox -a disable-setuid-sandbox -t 300000",
"test:browser:detect": "npm run test:browser-tpl -- -f ./tests/browser/detect.test.html",
"test:browser:recognize": "npm run test:browser-tpl -- -f ./tests/browser/recognize.test.html",
"test:browser:detect": "npm run test:browser-tpl -- -f ./tests/detect.test.html",
"test:browser:recognize": "npm run test:browser-tpl -- -f ./tests/recognize.test.html",
"lint": "eslint src"
},
"browser": {

8
tests/browser/detect.test.html → tests/detect.test.html

@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../../node_modules/mocha/mocha.css">
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
</head>
<body>
<div id="mocha"></div>
<script src="../../node_modules/mocha/mocha.js"></script>
<script src="../../node_modules/expect.js/index.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../node_modules/expect.js/index.js"></script>
<script src="http://localhost:3000/dist/tesseract.dev.js"></script>
<script>mocha.setup('bdd');</script>
<script src="../detect.test.js"></script>
<script src="./detect.test.js"></script>
<script>
mocha.run();
</script>

8
tests/browser/recognize.test.html → tests/recognize.test.html

@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="../../node_modules/mocha/mocha.css">
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
</head>
<body>
<div id="mocha"></div>
<script src="../../node_modules/mocha/mocha.js"></script>
<script src="../../node_modules/expect.js/index.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../node_modules/expect.js/index.js"></script>
<script src="http://localhost:3000/dist/tesseract.dev.js"></script>
<script>mocha.setup('bdd');</script>
<script src="../recognize.test.js"></script>
<script src="./recognize.test.js"></script>
<script>
mocha.run();
</script>
Loading…
Cancel
Save