Skip to content

Commit 5df8e27

Browse files
move mtcnn and uncompressed model tests to tests-legacy
1 parent 19836c1 commit 5df8e27

12 files changed

+21
-37
lines changed

jasmine-node.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
let spec_files = ['**/*.test.ts'].concat(
2-
process.env.EXCLUDE_UNCOMPRESSED
3-
? ['!**/*.uncompressed.test.ts']
4-
: []
5-
)
1+
let spec_files = ['**/*.test.ts']
62

73
// exclude browser tests
84
spec_files = spec_files.concat(['!**/*.browser.test.ts'])
5+
spec_files = spec_files.concat(['!test/tests.legacy/*'])
96

107
module.exports = {
118
spec_dir: 'test',

karma.conf.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,17 @@ let exclude = (
2222
'faceLandmarkNet',
2323
'faceRecognitionNet',
2424
'ssdMobilenetv1',
25-
'tinyFaceDetector',
26-
'mtcnn'
25+
'tinyFaceDetector'
2726
]
2827
: []
2928
)
3029
.filter(ex => ex !== process.env.UUT)
3130
.map(ex => `test/tests/${ex}/*.ts`)
3231

33-
34-
exclude = exclude.concat(
35-
process.env.EXCLUDE_UNCOMPRESSED
36-
? ['**/*.uncompressed.test.ts']
37-
: []
38-
)
39-
4032
// exclude nodejs tests
4133
exclude = exclude.concat(['**/*.node.test.ts'])
4234
exclude = exclude.concat(['test/env.node.ts'])
35+
exclude = exclude.concat(['test/tests-legacy/**/*.ts'])
4336

4437

4538
module.exports = function(config) {

package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,16 @@
1111
"tsc": "tsc",
1212
"tsc-es6": "tsc --p tsconfig.es6.json",
1313
"build": "rm -rf ./build && rm -rf ./dist && npm run rollup && npm run rollup-min && npm run tsc && npm run tsc-es6",
14-
"test": "karma start",
14+
"test": "npm run test-browser && npm run test-node",
1515
"test-browser": "karma start --single-run",
1616
"test-node": "ts-node -r ./test/env.node.ts node_modules/jasmine/bin/jasmine --config=jasmine-node.js",
17-
"test-all": "npm run test-browser-exclude-uncompressed && npm run test-node-exclude-uncompressed",
18-
"test-all-include-uncompressed": "npm run test-browser && npm run test-node",
1917
"test-facelandmarknets": "set UUT=faceLandmarkNet&& karma start",
2018
"test-facerecognitionnet": "set UUT=faceRecognitionNet&& karma start",
2119
"test-agegendernet": "set UUT=ageGenderNet&& karma start",
2220
"test-ssdmobilenetv1": "set UUT=ssdMobilenetv1&& karma start",
2321
"test-tinyfacedetector": "set UUT=tinyFaceDetector&& karma start",
2422
"test-globalapi": "set UUT=globalApi&& karma start",
25-
"test-mtcnn": "set UUT=mtcnn&& karma start",
2623
"test-cpu": "set BACKEND_CPU=true&& karma start",
27-
"test-exclude-uncompressed": "set EXCLUDE_UNCOMPRESSED=true&& karma start",
28-
"test-browser-exclude-uncompressed": "set EXCLUDE_UNCOMPRESSED=true&& karma start --single-run",
29-
"test-node-exclude-uncompressed": "set EXCLUDE_UNCOMPRESSED=true&& npm run test-node",
3024
"docs": "typedoc --options ./typedoc.config.js ./src"
3125
},
3226
"keywords": [

test/tests/faceLandmarkNet/faceLandmark68Net.uncompressed.test.ts renamed to test/tests-legacy/faceLandmark68Net.uncompressed.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { FaceLandmarks68, Point } from '../../../src';
2-
import { getTestEnv } from '../../env';
3-
import { describeWithBackend, describeWithNets, expectPointClose } from '../../utils';
1+
import { FaceLandmarks68, Point } from '../../src';
2+
import { getTestEnv } from '../env';
3+
import { describeWithBackend, describeWithNets, expectPointClose } from '../utils';
44

55
describeWithBackend('faceLandmark68Net, uncompressed', () => {
66

test/tests/faceLandmarkNet/faceLandmark68TinyNet.uncompressed.test.ts renamed to test/tests-legacy/faceLandmark68TinyNet.uncompressed.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Point } from '../../../src';
2-
import { FaceLandmarks68 } from '../../../src/classes/FaceLandmarks68';
3-
import { getTestEnv } from '../../env';
4-
import { describeWithBackend, describeWithNets, expectPointClose } from '../../utils';
1+
import { Point } from '../../src';
2+
import { FaceLandmarks68 } from '../../src/classes/FaceLandmarks68';
3+
import { getTestEnv } from '../env';
4+
import { describeWithBackend, describeWithNets, expectPointClose } from '../utils';
55

66
describeWithBackend('faceLandmark68TinyNet, uncompressed', () => {
77

test/tests/faceRecognitionNet/faceRecognitionNet.uncompressed.test.ts renamed to test/tests-legacy/faceRecognitionNet.uncompressed.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { createCanvasFromMedia, euclideanDistance } from '../../../src';
2-
import { getTestEnv } from '../../env';
3-
import { describeWithBackend, describeWithNets } from '../../utils';
1+
import { createCanvasFromMedia, euclideanDistance } from '../../src';
2+
import { getTestEnv } from '../env';
3+
import { describeWithBackend, describeWithNets } from '../utils';
44

55
describeWithBackend('faceRecognitionNet, uncompressed', () => {
66

test/tests/ssdMobilenetv1/ssdMobilenetv1.locateFaces.uncompressed.test.ts renamed to test/tests-legacy/ssdMobilenetv1.locateFaces.uncompressed.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as faceapi from '../../../src';
2-
import { getTestEnv } from '../../env';
3-
import { expectFaceDetections } from '../../expectFaceDetections';
4-
import { describeWithBackend, describeWithNets } from '../../utils';
5-
import { expectedSsdBoxes } from './expectedBoxes';
1+
import * as faceapi from '../../src';
2+
import { getTestEnv } from '../env';
3+
import { expectFaceDetections } from '../expectFaceDetections';
4+
import { describeWithBackend, describeWithNets } from '../utils';
5+
import { expectedSsdBoxes } from '../tests/ssdMobilenetv1/expectedBoxes';
66

77
describeWithBackend('ssdMobilenetv1.locateFaces, uncompressed', () => {
88

test/tests/dom/fetchNetWeights.browser.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { fetchNetWeights } from '../../../src';
33
describe('fetchNetWeights', () => {
44

55
it('fetches .weights file', async () => {
6-
const url = 'test/data/dummy.weights'
6+
const url = 'base/test/data/dummy.weights'
77
const weights = await fetchNetWeights(url)
88
expect(weights instanceof Float32Array).toBe(true)
99
})

0 commit comments

Comments
 (0)