HTML5 provides us with lots of semantic elements aimed to describe precisely the content. Make sure you benefit from its rich vocabulary.
<!-- bad -->
scalar DateTime | |
scalar Date | |
type Tag { | |
name: String | |
} | |
interface Sortable { | |
orderId: Int! | |
} |
import type { ReactElement } from 'react'; | |
import { describe } from '@asdgf/core'; | |
import { assert } from '@asdgf/testing-helpers/uvu/assert/index.js'; | |
import { composeStories, render, screen, waitFor, fireEvent } from 'test/render'; | |
import { StoriesToComposeStories } from 'types/storybook'; | |
import * as stories from './CurriculumTable.stories'; | |
const { DefaultStory } = composeStories(stories) as StoriesToComposeStories<typeof stories>; | |
async function renderWithOptions(story: ReactElement) { |
import '@testing-library/jest-dom/extend-expect' | |
import * as React from 'react' | |
import {render, screen} from '@testing-library/react' | |
import userEvent from '@testing-library/user-event' | |
import SimpleList from '../SimpleList' | |
test('can remove items from the list', () => { | |
render(<SimpleList />) | |
const deleteButton = fireEvent.click(screen.queryAllByTestId('delete-button')[0] as HTMLElement) | |
userEvent.click(deleteButton) |
type Coordinate = [number, number]; | |
function updateBoard(board: string[][], click: number[]): string[][] { | |
const boardCopy = [...board]; | |
const coordinates: Coordinate = [click[0], click[1]]; | |
const result = traverse(boardCopy, coordinates); | |
return result; | |
}; |
[ | |
{ | |
status: 'fulfilled', | |
value: { | |
status: 200, | |
statusText: 'OK', | |
headers: [Object], | |
config: [Object], | |
request: [ClientRequest], | |
data: [Object] |
{"lastUpload":"2020-12-15T06:05:55.266Z","extensionVersion":"v3.4.3"} |
{"lastUpload":"2019-11-18T09:11:00.859Z","extensionVersion":"v3.4.3"} |
import React, { useState } from 'react'; | |
import List from './List'; | |
import Item from './Item'; | |
export default () => { | |
const [input, setInput] = useState(''); | |
const [todos, setTodos] = useState([]); | |
return ( | |
<div> |
import React, { useState } from 'react'; | |
import List from './List'; | |
export default () => { | |
const [input, setInput] = useState(''); | |
let todos = []; | |
return ( | |
<div> | |
<input |