Skip to content

Commit 4bf317d

Browse files
committed
Move tests
1 parent cfa6fcb commit 4bf317d

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "nodejs-genai-batch-prediction-samples",
3+
"version": "0.0.1",
4+
"private": true,
5+
"license": "Apache-2.0",
6+
"author": "Google LLC",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git"
10+
},
11+
"engines": {
12+
"node": ">=16.0.0"
13+
},
14+
"files": [
15+
"*.js"
16+
],
17+
"scripts": {
18+
"test": "c8 mocha -p -j 2 --timeout 2400000 test/*.test.js test/**/*.test.js"
19+
},
20+
"dependencies": {
21+
"@google/genai": "1.30.0"
22+
},
23+
"devDependencies": {
24+
"c8": "^10.0.0",
25+
"chai": "^4.5.0",
26+
"mocha": "^10.0.0",
27+
"proxyquire": "^2.1.3"
28+
}
29+
}

genai/test/batchpredict-embeddings-with-gcs.test.js renamed to genai/batch-prediction/test/batchpredict-embeddings-with-gcs.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ const {describe, it} = require('mocha');
1919

2020
const projectId = process.env.CAIP_PROJECT_ID;
2121
const location = 'us-central1';
22-
const {delay} = require('./util');
22+
const {delay} = require('../../test/util');
2323
const proxyquire = require('proxyquire');
2424
const {GoogleGenAI_Mock} = require('./batchprediction-utils');
2525

2626
const sample = proxyquire(
27-
'../batch-prediction/batchpredict-embeddings-with-gcs',
27+
'../batchpredict-embeddings-with-gcs',
2828
{
2929
'@google/genai': {
3030
GoogleGenAI: GoogleGenAI_Mock,

genai/test/batchpredict-with-bq.test.js renamed to genai/batch-prediction/test/batchpredict-with-bq.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ const {describe, it} = require('mocha');
1919

2020
const projectId = process.env.CAIP_PROJECT_ID;
2121
const location = 'us-central1';
22-
const {delay} = require('./util');
22+
const {delay} = require('../../test/util');
2323

2424
const proxyquire = require('proxyquire');
2525
const {GoogleGenAI_Mock} = require('./batchprediction-utils');
2626

27-
const sample = proxyquire('../batch-prediction/batchpredict-with-bq', {
27+
const sample = proxyquire('../batchpredict-with-bq', {
2828
'@google/genai': {
2929
GoogleGenAI: GoogleGenAI_Mock,
3030
},

genai/test/batchpredict-with-gcs.test.js renamed to genai/batch-prediction/test/batchpredict-with-gcs.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ const proxyquire = require('proxyquire');
2020

2121
const projectId = process.env.CAIP_PROJECT_ID;
2222
const location = 'us-central1';
23-
const {delay} = require('./util');
23+
const {delay} = require('../../test/util');
2424
const {GoogleGenAI_Mock} = require('./batchprediction-utils');
2525

26-
const sample = proxyquire('../batch-prediction/batchpredict-with-gcs', {
26+
const sample = proxyquire('../batchpredict-with-gcs', {
2727
'@google/genai': {
2828
GoogleGenAI: GoogleGenAI_Mock,
2929
},
File renamed without changes.

0 commit comments

Comments
 (0)