Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 13 additions & 0 deletions src/version.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { LIB_VERSION } from './version';

describe('Version Module', () => {
it('should export a LIB_VERSION constant', () => {
expect(LIB_VERSION).toBeDefined();
});

it('should match the version specified in package.json', () => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const packageJson = require('../package.json');
expect(LIB_VERSION).toBe(packageJson.version);
});
});
4 changes: 3 additions & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export const LIB_VERSION = '3.0.0';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const packageJson = require('../package.json');
export const LIB_VERSION = packageJson.version;