Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tillhub): adds environment information
- Loading branch information
1 parent
9dc7b9b
commit 6913937
Showing
3 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare function require(moduleName: string): any | ||
|
||
export const environment = { | ||
VERSION: require('../package.json').version | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { environment } from '../src/environment' | ||
|
||
describe('SDK: environemt', () => { | ||
it('Will have set environment version at compile time', () => { | ||
expect(environment).toBeDefined() | ||
expect(environment.VERSION).toBeDefined() | ||
expect(environment.VERSION).toBe(process.env.npm_package_version) | ||
}) | ||
}) |