Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions integrations/test/version_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ import {version} from '@google/adk-integrations';
import {describe, expect, it} from 'vitest';
import packageJson from '../package.json' with {type: 'json'};

/** Semver core, with an optional prerelease suffix such as `-rc.1`. */
const SEMVER_PATTERN = /^\d+\.\d+\.\d+(-[\w.]+)?$/;

describe('version', () => {
it('should match the version declared in package.json', () => {
expect(version).toBe(packageJson.version);
});

it('should be a well-formed semantic version string', () => {
expect(version).toMatch(SEMVER_PATTERN);
});
});
Loading