Skip to content

Instantly share code, notes, and snippets.

View ParkYoungWoong's full-sized avatar
🍀
Have a great day!

HEROPY ParkYoungWoong

🍀
Have a great day!
View GitHub Profile
/**
* Make all properties in T optional
*/
type Partial<T> = {
[P in keyof T]?: T[P];
};
/**
* Make all properties in T required
*/
@ParkYoungWoong
ParkYoungWoong / index.js
Last active October 6, 2019 09:39
svelte-testing-library/src/index.js
import {getQueriesForElement, prettyDOM} from '@testing-library/dom'
export const render = (Component, {target, ...options} = {}) => {
// ...
return {
component,
// eslint-disable-next-line no-console
debug: (el = document.body) => console.log(prettyDOM(el)),
container: document.body,
...getQueriesForElement(document.body),
// stylelint-disable
$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #e9ecef !default;
$gray-300: #dee2e6 !default;
$gray-400: #ced4da !default;
$gray-500: #adb5bd !default;
$gray-600: #6c757d !default;
$gray-700: #495057 !default;
$gray-800: #343a40 !default;