├── .gitattributes
├── .github
├── FUNDING.yml
└── workflows
│ └── google.yml
├── .gitignore
├── .vscode
└── settings.json
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── content
└── filestructure.yml
├── package-lock.json
├── package.json
├── public
└── index.html
└── src
├── App.js
├── components
├── articles
│ └── Articles.js
├── skeletons
│ ├── Shimmer.js
│ ├── SkeletonArticle.js
│ ├── SkeletonElement.js
│ └── SkeletonProfile.js
└── user
│ └── User.js
├── index.css
├── index.js
├── reportWebVitals.js
└── setupTests.js
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/.github/workflows/google.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE when a release is created
2 | #
3 | # To configure this workflow:
4 | #
5 | # 1. Ensure that your repository contains the necessary configuration for your Google Kubernetes Engine cluster, including deployment.yml, kustomization.yml, service.yml, etc.
6 | #
7 | # 2. Set up secrets in your workspace: GKE_PROJECT with the name of the project and GKE_SA_KEY with the Base64 encoded JSON service account key (https://github.com/GoogleCloudPlatform/github-actions/tree/docs/service-account-key/setup-gcloud#inputs).
8 | #
9 | # 3. Change the values for the GKE_ZONE, GKE_CLUSTER, IMAGE, and DEPLOYMENT_NAME environment variables (below).
10 | #
11 | # For more support on how to run the workflow, please visit https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/gke
12 |
13 | name: Build and Deploy to GKE
14 |
15 | on:
16 | release:
17 | types: [created]
18 |
19 | env:
20 | PROJECT_ID: ${{ secrets.GKE_PROJECT }}
21 | GKE_CLUSTER: cluster-1 # TODO: update to cluster name
22 | GKE_ZONE: us-central1-c # TODO: update to cluster zone
23 | DEPLOYMENT_NAME: gke-test # TODO: update to deployment name
24 | IMAGE: static-site
25 |
26 | jobs:
27 | setup-build-publish-deploy:
28 | name: Setup, Build, Publish, and Deploy
29 | runs-on: ubuntu-latest
30 | environment: production
31 |
32 | steps:
33 | - name: Checkout
34 | uses: actions/checkout@v2
35 |
36 | # Setup gcloud CLI
37 | - uses: google-github-actions/setup-gcloud@v0.2.0
38 | with:
39 | service_account_key: ${{ secrets.GKE_SA_KEY }}
40 | project_id: ${{ secrets.GKE_PROJECT }}
41 |
42 | # Configure Docker to use the gcloud command-line tool as a credential
43 | # helper for authentication
44 | - run: |-
45 | gcloud --quiet auth configure-docker
46 |
47 | # Get the GKE credentials so we can deploy to the cluster
48 | - uses: google-github-actions/get-gke-credentials@v0.2.1
49 | with:
50 | cluster_name: ${{ env.GKE_CLUSTER }}
51 | location: ${{ env.GKE_ZONE }}
52 | credentials: ${{ secrets.GKE_SA_KEY }}
53 |
54 | # Build the Docker image
55 | - name: Build
56 | run: |-
57 | docker build \
58 | --tag "gcr.io/$PROJECT_ID/$IMAGE:$GITHUB_SHA" \
59 | --build-arg GITHUB_SHA="$GITHUB_SHA" \
60 | --build-arg GITHUB_REF="$GITHUB_REF" \
61 | .
62 |
63 | # Push the Docker image to Google Container Registry
64 | - name: Publish
65 | run: |-
66 | docker push "gcr.io/$PROJECT_ID/$IMAGE:$GITHUB_SHA"
67 |
68 | # Set up kustomize
69 | - name: Set up Kustomize
70 | run: |-
71 | curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64
72 | chmod u+x ./kustomize
73 |
74 | # Deploy the Docker image to the GKE cluster
75 | - name: Deploy
76 | run: |-
77 | ./kustomize edit set image gcr.io/PROJECT_ID/IMAGE:TAG=gcr.io/$PROJECT_ID/$IMAGE:$GITHUB_SHA
78 | ./kustomize build . | kubectl apply -f -
79 | kubectl rollout status deployment/$DEPLOYMENT_NAME
80 | kubectl get services -o wide
81 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to make participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | > © React Loading Skeleton
56 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to React Loading Skeleton
2 | We love the activism, the contribution of the people. You can taste it. Will it be:
3 | - Reporting an issue
4 | - Discussing the current state of the code
5 | - Submitting a fix
6 | - Proposing new features
7 | ## Code of Conduct
8 | The code of conduct is described in [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md).
9 | ## Standard rules to be followed
10 | Here are some suggestions on how to look or get an appointment for antique items.
11 | 1. Make sure you place the web project on the correct branch (dev).
12 | 2. Upload files exactly. To discuss it.
13 |
14 | > If you need to modify environment variables for dev, you need to modify them inside `/home/facebook/.bashrc` and restart your terminal.
15 |
16 | #### `dev`
17 | ```shell
18 | $ npm i
19 | $ npm start
20 | ```
21 |
22 | ## Feature Request
23 | Great Feature Requests tend to have:
24 |
25 | - A quick idea summary.
26 | - What & why you wanted to add the specific feature.
27 | - Additional context like images, links to resources to implement the feature etc, etc.
28 |
29 | ## License
30 | By contributing to React Loading Skeleton, you agree that your contributions will be licensed
31 | under the [LICENSE file](LICENSE).
32 |
33 | :rocket: Congratulations you are already one step away from publishing your work. (Confirmation).
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 asyncfinkd
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
React Loading Skeleton
2 |
3 |
4 | ## Why should I use react-loading-skeleton?
5 |
6 |
7 | - The first reason why you should use it is open source
8 | - The code is easily written.
9 | - Rendering time is not slow
10 | - Customized (will work in any project despite any complexity)
11 | - Good styling which will not interfere with your styles. (Tip: Use a webpack to protect yourself and assign classes automatically to the CSC)
12 | - A test website that is already ready for download is required
13 |
14 |
15 | ## Wondering about file structure?
16 |
17 | [Click here](content/filestructure.yml) to see the file structure of how we assembled it.
18 |
19 | ## Code Review
20 |
21 | ```jsx
22 | const [articles, setArticles] = useState(null);
23 |
24 | useEffect(() => {
25 | setTimeout(async () => {
26 | const res = await fetch("https://jsonplaceholder.typicode.com/posts");
27 | const data = await res.json();
28 | setArticles(data);
29 | }, 5000);
30 | });
31 | ```
32 | You can ignore this code because it is the JSON from which we bring the information. But here is an interesting thing we have a variable article. Which we call loading. It depends on that. Here I have the currently setTimeOut function. Which after 5 seconds calls the data export to the item variable
33 |
34 | ```jsx
35 | {!articles && [1, 2, 3, 4, 5].map((n) => )}
36 | ```
37 | Here it is written to repeat the skeleton 5 times. Which is once created. This in my opinion is correct and true if you see the code and then the result. You will be more convinced that it was necessary. Initially we had one container where I wrote 3 lines: but the minimum number of containers is 100. I did not do all 100 and decided to do 5. So I put just 5 numbers in the array and put them.
38 |
39 | The rest is already simpler, more stylized and already related to imports. And simple JSX syntax. Hope you have a good time
40 |
41 | ## Contributing
42 |
43 | The main purpose of this repository is to continue evolving React Loading Skeleton core, making it faster and easier to use. Development of React Loading Skeleton happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving React Loading Skeleton.
44 |
45 | ## [Code of Conduct](CODE_OF_CONDUCT.md)
46 |
47 | React Loading Skeleton has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
48 |
49 | ## [Contributing Guide](CONTRIBUTING.md)
50 |
51 | Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React Loading Skeleton.
52 |
53 | ## License
54 |
55 | React Loading Skeleton is [MIT licensed](LICENSE)
56 |
--------------------------------------------------------------------------------
/content/filestructure.yml:
--------------------------------------------------------------------------------
1 | - file: src
2 | file_child: App.js
3 | file_child: index.css
4 | file_child: index.js
5 | file_child: reportWebVitals.js
6 | file_child: setupTests.js
7 | - file: components
8 | file_child: articles/Articles.js
9 | file_child: user/User.js
10 | - file: components/skeletons
11 | file_child: SkeletonElement.js
12 | file_child: Shimmer.js
13 | file_child: SkeletonArticle.js
14 | file_child: SkeletonProfile.js
15 | - file: public
16 | file_child: index.html
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-loading-skeleton",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.12.0",
7 | "@testing-library/react": "^11.2.6",
8 | "@testing-library/user-event": "^12.8.3",
9 | "react": "^17.0.2",
10 | "react-dom": "^17.0.2",
11 | "react-scripts": "4.0.3",
12 | "web-vitals": "^1.1.1"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": [
22 | "react-app",
23 | "react-app/jest"
24 | ]
25 | },
26 | "browserslist": {
27 | "production": [
28 | ">0.2%",
29 | "not dead",
30 | "not op_mini all"
31 | ],
32 | "development": [
33 | "last 1 chrome version",
34 | "last 1 firefox version",
35 | "last 1 safari version"
36 | ]
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | react-loading-skeleton
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Articles from "./components/articles/Articles";
3 | import User from "./components/user/User";
4 |
5 | export default function App() {
6 | return (
7 | <>
8 |
9 |
10 | React Loading Skeleton
11 |
12 |
16 |
17 | >
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/src/components/articles/Articles.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import SkeletonArticle from "../skeletons/SkeletonArticle";
3 | // import SkeletonElement from "../skeletons/SkeletonElement";
4 |
5 | export default function Articles() {
6 | const [articles, setArticles] = useState(null);
7 |
8 | useEffect(() => {
9 | setTimeout(async () => {
10 | const res = await fetch("https://jsonplaceholder.typicode.com/posts");
11 | const data = await res.json();
12 | setArticles(data);
13 | }, 5000);
14 | });
15 |
16 | return (
17 | <>
18 |
19 |
Articles
20 |
21 | {articles && (
22 | <>
23 | {articles.map((item) => {
24 | return (
25 | <>
26 |
27 |
{item.title}
28 |
{item.body}
29 |
30 | >
31 | );
32 | })}
33 | >
34 | )}
35 |
36 | {!articles &&
37 | [1, 2, 3, 4, 5].map((n) =>
)}
38 |
39 | >
40 | );
41 | }
42 |
--------------------------------------------------------------------------------
/src/components/skeletons/Shimmer.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default function Shimmer() {
4 | return (
5 | <>
6 |
9 | >
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/src/components/skeletons/SkeletonArticle.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Shimmer from "./Shimmer";
3 | import SkeletonElement from "./SkeletonElement";
4 |
5 | export default function SkeletonArticle({ theme }) {
6 | const themeClass = theme || "light";
7 |
8 | return (
9 | <>
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | >
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/src/components/skeletons/SkeletonElement.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | export default function SkeletonElement({ type }) {
4 | return (
5 | <>
6 |
7 | >
8 | );
9 | }
10 |
--------------------------------------------------------------------------------
/src/components/skeletons/SkeletonProfile.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Shimmer from "./Shimmer";
3 | import SkeletonElement from "./SkeletonElement";
4 |
5 | export default function SkeletonProfile({ theme }) {
6 | const themeClass = theme || "light";
7 | return (
8 | <>
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | >
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/src/components/user/User.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import SkeletonProfile from "../skeletons/SkeletonProfile";
3 |
4 | export default function User() {
5 | const [profile, setProfile] = useState(null);
6 |
7 | useEffect(() => {
8 | setTimeout(async () => {
9 | const res = await fetch("https://jsonplaceholder.typicode.com/users/1");
10 | const data = await res.json();
11 | setProfile(data);
12 | }, 5000);
13 | });
14 |
15 | return (
16 | <>
17 |
18 |
User Details
19 | {profile && (
20 |
25 | )}
26 |
27 | {!profile && [1].map((n) =>
)}
28 |
29 | >
30 | );
31 | }
32 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 |
7 | body {
8 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
9 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
10 | sans-serif;
11 | -webkit-font-smoothing: antialiased;
12 | -moz-osx-font-smoothing: grayscale;
13 | }
14 |
15 | header {
16 | background-color: #1e65ff;
17 | padding: 10px;
18 | width: 100%;
19 | }
20 |
21 | header div,
22 | header h1 {
23 | color: white;
24 | margin: 0 auto;
25 | max-width: 1200px;
26 | }
27 |
28 | h2 {
29 | padding-bottom: 10px;
30 | border-bottom: 1px solid #eee;
31 | }
32 |
33 | .content {
34 | width: 100%;
35 | max-width: 1200px;
36 | margin: 0 auto;
37 | padding: 20px;
38 | display: grid;
39 | grid-template-columns: 2fr 1fr;
40 | gap: 100px;
41 | }
42 |
43 | .none {
44 | border: 0px;
45 | padding: 0px;
46 | }
47 |
48 | /* Skeleton */
49 |
50 | .skeleton {
51 | background: #ddd;
52 | margin: 10px 0;
53 | border-radius: 4px;
54 | }
55 |
56 | .skeleton.text {
57 | width: 100%;
58 | height: 12px;
59 | }
60 |
61 | .skeleton.title {
62 | width: 50%;
63 | height: 20px;
64 | margin-bottom: 15px;
65 | }
66 |
67 | .skeleton.avatar {
68 | width: 100px;
69 | height: 100px;
70 | border-radius: 50%;
71 | }
72 |
73 | .skeleton.thumbnail {
74 | width: 100px;
75 | height: 100px;
76 | }
77 |
78 | .skeleton-wrapper {
79 | margin: 20px auto;
80 | padding: 10px 15px;
81 | border-radius: 4px;
82 | position: relative;
83 | overflow: hidden;
84 | }
85 |
86 | .skeleton-profile {
87 | display: grid;
88 | grid-template-columns: 1fr 2fr;
89 | gap: 30px;
90 | align-items: center;
91 | }
92 |
93 | .skeleton-wrapper.light {
94 | background: #f2f2f2;
95 | }
96 |
97 | .skeleton-wrapper.dark {
98 | background: #444;
99 | }
100 |
101 | .skeleton-wrapper.dark .skeleton {
102 | background: #777;
103 | }
104 |
105 | .shimmer-wrapper {
106 | position: absolute;
107 | top: 0;
108 | left: 0;
109 | width: 100%;
110 | height: 100%;
111 | animation: loading 2.5s infinite;
112 | }
113 |
114 | .shimmer {
115 | width: 50%;
116 | height: 100%;
117 | background: rgba(255, 255, 255, 0.2);
118 | transform: skewX(-20deg);
119 | box-shadow: 0 0 30px 30px rgba(255, 255, 255, 0.05);
120 | }
121 |
122 | .dark .shimmer {
123 | background: rgba(255, 255, 255, 0.05);
124 | }
125 |
126 | @keyframes loading {
127 | 0% {
128 | transform: translateX(-150%);
129 | }
130 | 50% {
131 | transform: translateX(-60%);
132 | }
133 | 100% {
134 | transform: translateX(150%);
135 | }
136 | }
137 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 |
7 | ReactDOM.render(
8 |
9 |
10 | ,
11 | document.getElementById('root')
12 | );
13 |
14 | reportWebVitals();
15 |
--------------------------------------------------------------------------------
/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------