File size: 749 Bytes
cf86710
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import React from "react";

import { app } from "@/test/elements";
import { render } from "@/test/render";

import { ContainerAttributes } from "./ContainerAttributes";

beforeEach(() => {
  render(
    <div role="application">
      <ContainerAttributes />
    </div>,
  );
});

test('should have the "id" attribute', () => {
  expect(app().firstChild).toHaveAttribute("id", "testId");
});

test('should have the "title" attribute', () => {
  expect(app().firstChild).toHaveAttribute("title", "foo_title");
});

test('should have the "lang" attribute', () => {
  expect(app().firstChild).toHaveAttribute("lang", "it");
});

test("should have the data set attribute", () => {
  expect(app().firstChild).toHaveAttribute("data-test", "testData");
});