albertyw/reaction-pics

View on GitHub
server/test/Component.test.js

Summary

Maintainability
A
0 mins
Test Coverage
import { $, expect } from '@wdio/globals';

describe('WebdriverIO Component Testing', () => {
  it('should be able to render to the DOM and assert', async () => {
    const component = document.createElement('button');
    component.innerHTML = 'Hello World!';
    document.body.appendChild(component);

    await expect($('aria/Hello World!')).toBePresent();
    component.remove();
    await expect($('aria/Hello World!')).not.toBePresent();
  });
});