mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-30 05:23:53 +03:00
922985f9ea
* chore(deps): update dependency prettier to v3 * Format --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Nathan Bierema <nbierema@gmail.com>
27 lines
708 B
TypeScript
27 lines
708 B
TypeScript
import { mark, extract, refer } from '../src/helpers';
|
|
|
|
describe('Helpers', function () {
|
|
it('mark', function () {
|
|
expect(mark({ testData: 'test' }, 'testType')).toMatchSnapshot();
|
|
expect(
|
|
mark({ testData: 'test' }, 'testType', 'toString'),
|
|
).toMatchSnapshot();
|
|
});
|
|
|
|
it('extract', function () {
|
|
expect(extract({ testData: 'test' }, 'testType')).toMatchSnapshot();
|
|
});
|
|
|
|
it('refer', function () {
|
|
const TestClass = function (data: unknown) {
|
|
return data;
|
|
};
|
|
const testInstance = new (TestClass as any)({
|
|
testData: 'test',
|
|
}) as unknown;
|
|
expect(
|
|
refer(testInstance, 'testType', false, [TestClass as any]),
|
|
).toMatchSnapshot();
|
|
});
|
|
});
|