Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
afterEach(async function () {
if (driver) {
if (await adb.getApiLevel() > 23) {
let [language, country] = initialLocale.split('-');
await androidHelpers.ensureDeviceLocale(adb, language, country);
} else {
// This method is flakey in CI
if (!process.env.CI) {
await androidHelpers.ensureDeviceLocale(adb, null, initialLocale);
}
}
await deleteSession();
}
});
afterEach(async function () {
if (driver) {
if (await adb.getApiLevel() > 23) {
let [language, country] = initialLocale.split('-');
await androidHelpers.ensureDeviceLocale(adb, language, country);
} else {
// This method is flakey in CI
if (!process.env.CI) {
await androidHelpers.ensureDeviceLocale(adb, null, initialLocale);
}
}
await deleteSession();
}
});
after(async function () {
if (driver) {
if (await adb.getApiLevel() > 23) {
let [language, country] = initialLocale.split('-');
await androidHelpers.ensureDeviceLocale(driver.adb, language, country);
} else {
await androidHelpers.ensureDeviceLocale(driver.adb, null, initialLocale);
}
await deleteSession();
}
});
after(async function () {
if (driver) {
if (await adb.getApiLevel() > 23) {
let [language, country] = initialLocale.split('-');
await androidHelpers.ensureDeviceLocale(driver.adb, language, country);
} else {
await androidHelpers.ensureDeviceLocale(driver.adb, null, initialLocale);
}
await deleteSession();
}
});