casdoor/web/src/App.test.js

26 lines
972 B
JavaScript
Raw Normal View History

2022-02-13 23:39:27 +08:00
// Copyright 2021 The Casdoor Authors. All Rights Reserved.
2021-02-13 13:30:51 +08:00
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import React from "react";
import {render} from "@testing-library/react";
import App from "./App";
2020-10-20 21:46:44 +08:00
// eslint-disable-next-line no-undef
test("renders learn react link", () => {
const {getByText} = render(<App />);
2020-10-20 21:46:44 +08:00
const linkElement = getByText(/learn react/i);
// eslint-disable-next-line no-undef
2020-10-20 21:46:44 +08:00
expect(linkElement).toBeInTheDocument();
});