-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- remove start and end quotes from package name and version - increase unit test coverage
- Loading branch information
Showing
8 changed files
with
77 additions
and
4 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
File renamed without changes.
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
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,39 @@ | ||
/* | ||
* Copyright IBM Corp. 2023, 2023 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
import { describe, expect, it } from 'vitest' | ||
|
||
import { ManualMetricReader } from '../../main/core/manual-metric-reader.js' | ||
|
||
describe('manualMetricReader', () => { | ||
it('throws an exception when onShutdown is called', async () => { | ||
const metricReader = new ManualMetricReader() | ||
let error | ||
|
||
try { | ||
await metricReader.shutdown() | ||
} catch (err) { | ||
error = err | ||
} | ||
|
||
expect(error).toBeInstanceOf(Error) | ||
expect((error as Error).message).toBe('Method not implemented.') | ||
}) | ||
|
||
it('throws an exception when onForceFlush is called', async () => { | ||
const metricReader = new ManualMetricReader() | ||
let error | ||
|
||
try { | ||
await metricReader.forceFlush() | ||
} catch (err) { | ||
error = err | ||
} | ||
|
||
expect(error).toBeInstanceOf(Error) | ||
expect((error as Error).message).toBe('Method not implemented.') | ||
}) | ||
}) |
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,15 @@ | ||
/* | ||
* Copyright IBM Corp. 2023, 2023 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
import { describe, expect, it } from 'vitest' | ||
|
||
import { getPackageName } from '../../../main/scopes/npm/get-package-name.js' | ||
|
||
describe('getPackageName', () => { | ||
it('returns the correct package name for this file', () => { | ||
expect(getPackageName()).toBe('@ibm/telemetrics-js') | ||
}) | ||
}) |
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,15 @@ | ||
/* | ||
* Copyright IBM Corp. 2023, 2023 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
import { describe, expect, it } from 'vitest' | ||
|
||
import { getPackageVersion } from '../../../main/scopes/npm/get-package-version.js' | ||
|
||
describe('getPackageName', () => { | ||
it('returns a semantic-like version for this package', () => { | ||
expect(getPackageVersion()).toMatch(/\d+.\d+.\d+/) | ||
}) | ||
}) |
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