Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

write test case in react native

import React from "react";
import renderer from "react-test-renderer";
import App from "./App.js"
describe("<App />", () => {
    it('has 1 child', () => {
        const tree = renderer.create(<App />).toJSON();
        expect(tree.children.length).toBe(1);
    });
});
Source by www.smashingmagazine.com #
 
PREVIOUS NEXT
Tagged: #write #test #case #react #native
ADD COMMENT
Topic
Name
3+7 =