mirror of
https://gitee.com/openharmony/request_request
synced 2024-11-27 09:01:05 +00:00
request-TDD add
Signed-off-by: renjiecui <cuirenjie@huawei.com>
This commit is contained in:
parent
5377947403
commit
e864c66b43
@ -21,34 +21,35 @@ let keyStr = 'download test ';
|
||||
|
||||
describe('RequestTest', function () {
|
||||
beforeAll(function () {
|
||||
console.info('beforeAll caled')
|
||||
console.info('beforeAll called')
|
||||
})
|
||||
|
||||
afterAll(function () {
|
||||
console.info('afterAll caled')
|
||||
console.info('afterAll called')
|
||||
})
|
||||
|
||||
beforeEach(function () {
|
||||
console.info('beforeEach caled')
|
||||
console.info('beforeEach called')
|
||||
})
|
||||
|
||||
afterEach(function () {
|
||||
console.info('afterEach caled')
|
||||
console.info('afterEach called')
|
||||
})
|
||||
console.log(TAG + "*************Unit Test Begin*************");
|
||||
|
||||
/**
|
||||
* @tc.name: downloadTest001
|
||||
* @tc.desc see if download starts correctly
|
||||
* @tc.desc download parameter verification
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: 000000
|
||||
*/
|
||||
it('downloadTest001', 0, function () {
|
||||
console.log(TAG + "************* downloadTest001 start *************");
|
||||
let DownloadConfig;
|
||||
try {
|
||||
request.download(DownloadConfig);
|
||||
} catch (err) {
|
||||
expect(err.name !== undefined).assertEqual(true);
|
||||
expect(false).assertEqual(true);
|
||||
}
|
||||
console.log(TAG + "************* downloadTest001 end *************");
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user