• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2021-2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the 'License');
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an 'AS IS' BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import securityLabel from '@ohos.file.securityLabel';
17import fileio from '@ohos.fileio';
18import fileIO from '@ohos.file.fs';
19import featureAbility from '@ohos.ability.featureAbility';
20
21import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
22
23export async function nextFileName(testName) {
24  let context = featureAbility.getContext();
25  let data = await context.getFilesDir();
26  let BASE_PATH = data.substring(0, data.length - 5) + 'cache/';
27  return BASE_PATH + testName;
28}
29
30export {
31  describe,
32  beforeAll,
33  beforeEach,
34  afterEach,
35  afterAll,
36  it,
37  expect,
38  securityLabel,
39  fileio,
40  fileIO
41};