let seq = 0;

/**
 * generating id for jest's snapshots
 *
 * @param id
 * @param descr
 */
export function sid(id = '', descr = '') {
    if (!id) {
        throw Math.random().toString(36).slice(2)
    }

    seq++;
    return descr ? `${seq} @${id} - ${descr}` : `${seq} @${id}`
}

export function resetSid() {
    seq = 0;
}
