📅  最后修改于: 2022-03-11 15:01:37.900000             🧑  作者: Mango
import React from 'react';
import { expect } from 'chai';
import { shallow, mount, render } from 'enzyme';
import { NavLink } from 'react-router-dom';
describe(" ", () => {
it("1.contains correct passed prop", () => {
const comp = (
NaveLink Test
);
const wrapper = shallow( comp );
expect(wrapper.instance().props.to).to.equal("/home");
});
});