Skip to content

Instantly share code, notes, and snippets.

Bruna Pereira brunapereira

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.