From 4fa3cc70b5f5a58ad17fc46c21ac635151406efe Mon Sep 17 00:00:00 2001 From: duqingquan Date: Thu, 25 May 2023 11:21:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=94=B5=E9=87=8F=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E9=80=82=E9=85=8D=20uni=E8=87=AA=E5=8A=A8=E5=8C=96?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jest.config.js | 11 ------ .../uni-getbatteryinfo/utssdk/interface.uts | 7 +++- uni_modules/uni-wifi/utssdk/uni.autotest.js | 35 ------------------- 3 files changed, 6 insertions(+), 47 deletions(-) delete mode 100644 jest.config.js delete mode 100644 uni_modules/uni-wifi/utssdk/uni.autotest.js diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index a54d98a..0000000 --- a/jest.config.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - testTimeout: 10000, - reporters: [ - 'default' - ], - watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'], - moduleFileExtensions: ['js', 'json'], - rootDir: __dirname, - testMatch: ["/pages/**/*test.[jt]s?(x)"], - testPathIgnorePatterns: ['/node_modules/'] -} diff --git a/uni_modules/uni-getbatteryinfo/utssdk/interface.uts b/uni_modules/uni-getbatteryinfo/utssdk/interface.uts index 7d3bbf1..c32541b 100644 --- a/uni_modules/uni-getbatteryinfo/utssdk/interface.uts +++ b/uni_modules/uni-getbatteryinfo/utssdk/interface.uts @@ -58,4 +58,9 @@ export type GetBatteryInfoOptions = { * @assert () => success({errCode: 0, errSubject: "uni-getBatteryInfo", errMsg: "getBatteryInfo:ok", level: 60, isCharging: false }) * @assert () => fail({errCode: 1001, errSubject: "uni-getBatteryInfo", errMsg: "getBatteryInfo:fail getAppContext is null" }) */ -export type GetBatteryInfo = (options : GetBatteryInfoOptions) => void \ No newline at end of file +export type GetBatteryInfo = (options : GetBatteryInfoOptions) => void + + +interface Uni { + getBatteryInfo : GetBatteryInfo +} \ No newline at end of file diff --git a/uni_modules/uni-wifi/utssdk/uni.autotest.js b/uni_modules/uni-wifi/utssdk/uni.autotest.js deleted file mode 100644 index 93873d5..0000000 --- a/uni_modules/uni-wifi/utssdk/uni.autotest.js +++ /dev/null @@ -1,35 +0,0 @@ -function startWifi() { - return new Promise((resolve, reject) => { - uni.startWifi({ - success: () => { - console.log('startWifi success'); - resolve() - }, - fail: () => { - console.log('startWifi fail'); - reject() - } - }) - }) -} - -function stopWifi() { - return new Promise((resolve, reject) => { - uni.stopWifi({ - success: () => { - console.log('stopWifi success'); - resolve() - }, - fail: () => { - console.log('stopWifi success'); - fail() - } - }) - }) -} - - -module.exports = { - startWifi, - stopWifi -} -- GitLab