Skip to content

Instantly share code, notes, and snippets.

Bruna Pereira brunapereira

Block or report user

Report or block brunapereira

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View react-test-with-chai-enzyme.js
it('should render Card Component', () => {
const cardGroup = shallow(<CardGroup title="Test Group" cards={cards} />);
expect(cardGroup).to.have.exactly(2).descendants(Card)
})
View react-test.js
describe('Card Group Component', () => {
it('should render Card Component', () => {
const cardGroup = shallow(<CardGroup title="Test Group" cards={cards} />);
expect(cardGroup.find(Card).length).toBe(2);
})
});
View 1.1 - copy string.js
console.clear();
var string = 'conversion';
function changeString(string) {
string = 'opcon1';
console.log('inside', string);
}
changeString(string);
You can’t perform that action at this time.