aboutsummaryrefslogtreecommitdiffstats
path: root/public/prism/prism-handlebars.js
Commit message (Expand)AuthorAgeFilesLines
* chore: add prismjs for syntax highlightingArmand Philippot2021-12-301-0/+44
f73e2233ddcf281'>plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { describe, expect, it } from '@jest/globals';
import { render, screen as rtlScreen } from '@testing-library/react';
import { Checkbox } from './checkbox';

const doNothing = () => {
  // Do nothing
};

describe('Checkbox', () => {
  it('renders an unchecked checkbox', () => {
    render(
      <Checkbox
        id="checkbox"
        name="checkbox"
        onChange={doNothing}
        value="checkbox"
      />
    );
    expect(rtlScreen.getByRole('checkbox')).not.toBeChecked();
  });

  it('renders a checked checkbox', () => {
    render(
      <Checkbox
        id="checkbox"
        isChecked
        name="checkbox"
        onChange={doNothing}
        value="checkbox"
      />
    );
    expect(rtlScreen.getByRole('checkbox')).toBeChecked();
  });
});