- Jest
- React Testing Library
- Faker (generate mock data)
- msw (mock server)
- Cypress
- Puppeteer / playwright?
import { forceUpdate } from '@stencil/core'; | |
interface Todo { | |
completed: boolean; | |
name: string; | |
date: Date; | |
id: string; | |
} | |
interface State { |
import merge from "lodash/merge" | |
import * as z from "zod" | |
const recursiveError = (arr: Array<string | number>, lastError: string[] | object): any => { | |
if (!arr || arr.length === 0) { | |
return lastError | |
} | |
const [currPath, ...iss] = arr | |
let newErr | |
if (typeof currPath === "string") { |
<template> | |
<div | |
class="dropdown" | |
:class="{ 'dropdown--open': isOpen }" | |
v-click-outside="closeDropdown" | |
> | |
<button | |
class="dropdown__button" | |
type="button" | |
@click="toggle" |
<template> | |
<div class="autocomplete"> | |
<label :for="inputId">{{ label }}</label> | |
<div class="autocomplete__input-group" :class="{ 'autocomplete__input-group--error': validatonMessage }"> | |
<input | |
type="text" | |
:name="inputName" | |
:id="inputId" | |
autocomplete="off" | |
aria-autocomplete="list" |
class Accordation { | |
constructor ({ el, openOnLoad = false, id }) { | |
this.el = el; | |
this.openOnLoad = openOnLoad; | |
this.id = id; | |
this.trigger = null; | |
this.body = null; | |
this.isOpen = openOnLoad; |
function createHtmlEl (type, { classes, text, attributes }) { | |
const el = document.createElement(type); | |
if (classes) { | |
classes.map(classToAdd => { | |
el.classList.add(classToAdd); | |
}); | |
} | |
if (attributes) { | |
attributes.map(attr => { |
<template> | |
<div class="tabs"> | |
<ul role="tablist" class="tabs__list"> | |
<li role="presentation" v-for="(tab, key) in children" :key="key" class="tabs__list-item"> | |
<a | |
:href="'#' + tab.id" | |
role="tab" | |
:aria-controls="tab.id" | |
:id="tab.trigger" | |
class="tabs__link" |
<template> | |
<div class="modal" :class="{ 'modal--open': isOpen }" role="dialog" tabindex="-1" :aria-labelledby="id"> | |
<div class="modal__content"> | |
<div class="modal__header"> | |
<div class="modal__header-left"> | |
<h2 class="modal__heading" :class="{ 'sr-only': headingIsSrOnly }" :id="id">{{ heading }}</h2> | |
<slot name="header"></slot> | |
</div> | |
<div class="modal__header-right"> | |
<button class="modal__close" @click="closeModal" aria-label="Closed modal"> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<!-- thanks to Mailchimp: https://github.com/mailchimp/email-blueprints/blob/master/responsive-templates/base_boxed_basic_query.html --> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>@yield('title')</title> | |
<style type="text/css"> | |
/* /\/\/\/\/\/\/\/\/ CLIENT-SPECIFIC STYLES /\/\/\/\/\/\/\/\/ */ | |
#outlook a{padding:0;} /* Force Outlook to provide a "view in browser" message */ | |
.ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */ |