Skip to content

Instantly share code, notes, and snippets.

@vasylnahuliak
vasylnahuliak / Accordion.testID.ts
Created March 18, 2023 12:00
Example unique testID
import { getTestID } from 'helpers/getTestID/getTestID';
export const TEST_ID = {
CONTAINER: 'CONTAINER',
LABEL: 'LABEL',
};
export const testID = getTestID({
testID: TEST_ID,
prefix: 'ACCORDION',
@vasylnahuliak
vasylnahuliak / getTestID.ts
Last active June 23, 2023 05:42
Generating unique testID
type GetTestIDArgs<TestID> = {
testID: TestID;
prefix: string;
}
export const getTestID = <TestID extends Record<string, string>>({
testID,
prefix,
}: GetTestIDArgs<TestID>): TestID => {
return new Proxy(testID, {
@vasylnahuliak
vasylnahuliak / firebase_debug_view_ios.js
Created July 3, 2022 19:17
Firebase Debug View (iOS)
Settings.set({
'/google/firebase/debug_mode': 1,
'/google/measurement/debug_mode': 1,
});
@vasylnahuliak
vasylnahuliak / firebase_debug_view_android.sh
Created June 1, 2022 05:41
Firebase Debug View (Android)
adb shell setprop debug.firebase.analytics.app PACKAGE_NAME
import axios from 'axios';
const api = axios.create({
baseURL: process.env.API_URL,
timeout: 10000,
headers: {
'Content-Type': 'application/json',
},
});
console.log([...formData])
const data = new FormData();
Object.keys(payload).map(key => data.append(key, payload[key]));