[js/web] update npm test to load test cases only for required backends (#17555)

### Description
update npm test to load test cases for required backends.

No need to load test case list for the backends that we don't test.
This commit is contained in:
Yulong Wang 2023-09-15 13:55:25 -07:00 committed by GitHub
parent fdb132643d
commit 155887593d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,8 +84,10 @@ async function main() {
.flat();
for (const backend of DEFAULT_BACKENDS) {
nodeTests.set(backend, loadNodeTests(backend, allNodeTestsFolders));
opTests.set(backend, loadOpTests(backend));
if (args.backends.indexOf(backend) !== -1) {
nodeTests.set(backend, loadNodeTests(backend, allNodeTestsFolders));
opTests.set(backend, loadOpTests(backend));
}
}
}