diff --git a/storage/storageenvironmentjstest/src/main/js/default/test/Common.js b/storage/storageenvironmentjstest/src/main/js/default/test/Common.js index bfda5680991a0bfcd396294acfcf5fe3c3b2590b..6336fb2b509d3617b29b32526ca75c049e184e00 100644 --- a/storage/storageenvironmentjstest/src/main/js/default/test/Common.js +++ b/storage/storageenvironmentjstest/src/main/js/default/test/Common.js @@ -14,9 +14,6 @@ */ import environment from '@ohos.environment'; -import process from '@ohos.process'; - -import fileio from '@ohos.fileio'; import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect @@ -30,24 +27,6 @@ function isString(str) { return typeof str == "string" && str.constructor == String; } -async function readFile(path){ - let fd = fileio.openSync(path); - let buf = new ArrayBuffer(4096); - let readOut = await fileio.read(fd, buf); - let dataStr = String.fromCharCode.apply(null, new Uint8Array(readOut.buffer)); - return dataStr; -} - -async function executeRunCmd(command){ - console.log(`cmd===${command}`); - let child = await process.runCmd(command); - let result = child.wait(); - let val = await child.getOutput(); - console.log("getOutput===="+val); - let dataStr = String.fromCharCode.apply(null, val); - return dataStr; -} - export { environment, isIntNum, @@ -59,6 +38,4 @@ export { afterAll, it, expect, - readFile, - executeRunCmd }; \ No newline at end of file