@tapjs/reporter
Version:
Pretty test output reporters for tap
11 lines • 449 B
JavaScript
import { useLayoutEffect, useState } from 'react';
import { listenCleanup } from '../listen-cleanup.js';
export const useCountsLists = (test) => {
const [[counts, lists], update] = useState([
test.counts,
test.lists,
]);
useLayoutEffect(() => listenCleanup(test.parser, 'result', () => update([test.counts, test.lists])), [test, counts, lists]);
return [counts, lists];
};
//# sourceMappingURL=use-counts-lists.js.map