This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d2abd4
commit 20d5062
Showing
2 changed files
with
50 additions
and
15 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
29 changes: 29 additions & 0 deletions
29
src/nni_manager/training_service/reusable/test/amlClient.test.ts
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,29 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
import * as chai from 'chai'; | ||
import { cleanupUnitTest, prepareUnitTest } from '../../../common/utils'; | ||
import chaiAsPromised = require("chai-as-promised"); | ||
import { AMLClient } from '../aml/amlClient'; | ||
|
||
|
||
describe('Unit Test for amlClient', () => { | ||
|
||
before(() => { | ||
chai.should(); | ||
chai.use(chaiAsPromised); | ||
prepareUnitTest(); | ||
}); | ||
|
||
after(() => { | ||
cleanupUnitTest(); | ||
}); | ||
|
||
it('test parseContent', async () => { | ||
|
||
let amlClient: AMLClient = new AMLClient('', '', '', '', '', '', '', ''); | ||
|
||
chai.assert.equal(amlClient.parseContent('test', 'test:1234'), '1234', "The content should be 1234"); | ||
chai.assert.equal(amlClient.parseContent('test', 'abcd:1234'), '', "The content should be null"); | ||
}); | ||
}); |