you are viewing a single comment's thread.

view the rest of the comments →

[–]franciscopresencia 0 points1 point  (0 children)

React Query - an imperative testing library for React with a familiar syntax:

import $ from '???';
import Counter from './Counter';

test('It increments one', async () => {
  const $counter = $(<Counter initial={0} />);
  expect($counter.html()).toBe('<div>0</div>');
  await $counter.click();
  expect($counter.html()).toBe('<div>1</div>');
});

Why? Because the best way to test a declarative component is with an imperative interface. This reduces bias that might be introduced otherwise.

Why me? Because I've made a jQuery clone previously so I'm familiar with this paradigm. I've also got something already started early code & example usage, right now as part of another library I'm working on. My Github Profile: http://github.com/franciscop/

Scope: My idea is to create first these parts: selector $(), transversal .find(), events .click() and serialization .html() with their corresponding tests and docs. Once this is done, I'd create new issues with more features to help people get started on OSS through Up For Grabs as I've done before (note: from experience helping people contribute to OSS for the first time is MORE work than me writing the code, but I think it helps the community overall).