Skip to content

Instantly share code, notes, and snippets.

@achhunna
Created May 10, 2019 16:54
Show Gist options
  • Save achhunna/bd4208b43a6bbb6b38e10d2b438cd234 to your computer and use it in GitHub Desktop.
Save achhunna/bd4208b43a6bbb6b38e10d2b438cd234 to your computer and use it in GitHub Desktop.
Existence of DOM elements
test('has blah class', () => {
expect(wrapper.contains('.blah')).toBe(true);
});
// check multiple elements by verifying count
test('has blah classes', () => {
expect(wrapper.findAll('.blah').length).toBe(10);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment