From a98dc36786f00d815d70145b7c92c03b3a8c7fe9 Mon Sep 17 00:00:00 2001 From: Angel Caamal Date: Fri, 22 May 2026 19:57:54 +0000 Subject: [PATCH 1/2] fix(genai): resolve module path and naming issues in count-tokens samples --- .../test/counttoken-localtokenizer-compute-with-txt.test.js | 4 ++-- .../test/counttoken-localtokenizer-with-txt.test.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/genai/count-tokens/test/counttoken-localtokenizer-compute-with-txt.test.js b/genai/count-tokens/test/counttoken-localtokenizer-compute-with-txt.test.js index 986850ba3c..3fa1ecc578 100644 --- a/genai/count-tokens/test/counttoken-localtokenizer-compute-with-txt.test.js +++ b/genai/count-tokens/test/counttoken-localtokenizer-compute-with-txt.test.js @@ -18,7 +18,7 @@ const {assert} = require('chai'); const {describe, it} = require('mocha'); const projectId = process.env.CAIP_PROJECT_ID; -const sample = require('../counttoken-localtokenizer-compute-with-txt.js'); +const sample = require('../counttoken-compute-with-txt'); const {delay} = require('../../test/util'); describe('counttoken-localtokenizer-compute-with-txt', () => { @@ -26,7 +26,7 @@ describe('counttoken-localtokenizer-compute-with-txt', () => { this.timeout(18000); this.retries(4); await delay(this.test); - const output = await sample.countTokenLocalTokenizerCompute(projectId); + const output = await sample.countTokens(projectId); assert(output.length > 0); }); }); diff --git a/genai/count-tokens/test/counttoken-localtokenizer-with-txt.test.js b/genai/count-tokens/test/counttoken-localtokenizer-with-txt.test.js index bc02fe9bba..ce21acd32d 100644 --- a/genai/count-tokens/test/counttoken-localtokenizer-with-txt.test.js +++ b/genai/count-tokens/test/counttoken-localtokenizer-with-txt.test.js @@ -18,7 +18,7 @@ const {assert} = require('chai'); const {describe, it} = require('mocha'); const projectId = process.env.CAIP_PROJECT_ID; -const sample = require('../counttoken-localtokenizer-with-txt.js'); +const sample = require('../counttoken-with-txt.js'); const {delay} = require('../../test/util'); describe('counttoken-localtokenizer-with-txt', () => { @@ -26,7 +26,7 @@ describe('counttoken-localtokenizer-with-txt', () => { this.timeout(18000); this.retries(4); await delay(this.test); - const output = await sample.countTokenLocalTokenizer(projectId); + const output = await sample.countTokens(projectId); assert(output > 0); }); }); From 22d350905cc0e185e50f1d4bc441ae9264bc0de4 Mon Sep 17 00:00:00 2001 From: Angel Caamal Date: Fri, 22 May 2026 20:05:16 +0000 Subject: [PATCH 2/2] style: ensure consistent .js extension in require statements --- .../test/counttoken-localtokenizer-compute-with-txt.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genai/count-tokens/test/counttoken-localtokenizer-compute-with-txt.test.js b/genai/count-tokens/test/counttoken-localtokenizer-compute-with-txt.test.js index 3fa1ecc578..e6696f367c 100644 --- a/genai/count-tokens/test/counttoken-localtokenizer-compute-with-txt.test.js +++ b/genai/count-tokens/test/counttoken-localtokenizer-compute-with-txt.test.js @@ -18,7 +18,7 @@ const {assert} = require('chai'); const {describe, it} = require('mocha'); const projectId = process.env.CAIP_PROJECT_ID; -const sample = require('../counttoken-compute-with-txt'); +const sample = require('../counttoken-compute-with-txt.js'); const {delay} = require('../../test/util'); describe('counttoken-localtokenizer-compute-with-txt', () => {