reblend-testing-library
Version:
Simple and complete Reblendjs testing utilities that encourage good testing practices.
14 lines (13 loc) • 479 B
JavaScript
;
var _reblendjs = require("reblendjs");
var _ = require("../");
// This just verifies that by importing RTL in an
// environment which supports afterEach (like jest)
// we'll get automatic cleanup between tests.
test('first', async () => {
await (0, _.render)(_reblendjs.Reblend.construct.bind(this)("div", null, "hi"));
expect(_.screen.getByText('hi').textContent).toBe('hi');
});
test('second', async () => {
expect(document.body).toBeEmptyDOMElement();
});