📜  在 react native 中编写测试用例 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:10.175000             🧑  作者: Mango

代码示例1
import React from "react";
import renderer from "react-test-renderer";
import App from "./App.js"
describe("", () => {
    it('has 1 child', () => {
        const tree = renderer.create().toJSON();
        expect(tree.children.length).toBe(1);
    });
});