reblend-testing-library
Version:
Simple and complete Reblendjs testing utilities that encourage good testing practices.
18 lines (16 loc) • 511 B
JavaScript
;
var _reblendjs = require("reblendjs");
let render;
beforeAll(() => {
process.env.RTL_SKIP_AUTO_CLEANUP = 'true';
const rtl = require('../');
render = rtl.render;
});
// This one verifies that if RTL_SKIP_AUTO_CLEANUP is set
// then we DON'T auto-wire up the afterEach for folks
test('first', async () => {
await render(_reblendjs.Reblend.construct.bind(this)("div", null, "hi"));
});
test('second', async () => {
expect(document.body.innerHTML).toEqual('<div><div>hi</div></div>');
});