aaronjameslang/antd-promise-button

View on GitHub
src/PromiseButton.spec.tsx.md

Summary

Maintainability
Test Coverage
# Snapshot report for `src/PromiseButton.spec.tsx`

The actual snapshot is saved in `PromiseButton.spec.tsx.snap`.

Generated by [AVA](https://ava.li).

## Backwards Compatible Button

> Snapshot 1

    <button
      className="ant-btn"
      colors={
        {
          FULFILLED: '#52c41a',
          REJECTED: '#f5222d',
        }
      }
      onClick={Function {}}
      style={undefined}
      timeout={2000}
      type="button"
    >
      <span>
        Click Me!
      </span>
    </button>

## Simple Button

> Snapshot 1

    <button
      className="ant-btn"
      colors={
        {
          FULFILLED: '#52c41a',
          REJECTED: '#f5222d',
        }
      }
      onClick={Function {}}
      style={undefined}
      timeout={2000}
      type="button"
    >
      <span>
        Click Me!
      </span>
    </button>

## Simple Button, render

> Snapshot 1

    <button
      className="ant-btn"
      colors={
        {
          FULFILLED: '#52c41a',
          REJECTED: '#f5222d',
        }
      }
      onClick={Function {}}
      style={undefined}
      timeout={2000}
      type="button"
    >
      <span>
        Click Me!
      </span>
    </button>

## Simple Button, click

> Snapshot 1

    initialize [
      {
        attribs: {
          class: 'ant-btn',
          colors: '[object Object]',
          timeout: '2000',
          type: 'button',
        },
        children: [],
        name: 'button',
        namespace: 'http://www.w3.org/1999/xhtml',
        next: null,
        parent: null,
        prev: null,
        root: {
          attribs: {},
          children: [
            [Circular],
          ],
          name: 'root',
          namespace: 'http://www.w3.org/1999/xhtml',
          next: null,
          parent: null,
          prev: null,
          type: 'root',
          'x-attribsNamespace': {},
          'x-attribsPrefix': {},
        },
        type: 'tag',
        'x-attribsNamespace': {
          class: undefined,
          colors: undefined,
          timeout: undefined,
          type: undefined,
        },
        'x-attribsPrefix': {
          class: undefined,
          colors: undefined,
          timeout: undefined,
          type: undefined,
        },
      },
      ---
      _root: [Circular],
      length: 1,
      options: {
        decodeEntities: true,
        normalizeWhitespace: false,
        withDomLvl1: true,
        xml: false,
      },
    ]

> Snapshot 2

    initialize [
      {
        attribs: {
          class: 'ant-btn ant-btn-loading',
          colors: '[object Object]',
          timeout: '2000',
          type: 'button',
        },
        children: [
          {
            attribs: {
              'aria-label': 'icon: loading',
              class: 'anticon anticon-loading',
            },
            children: [
              {
                attribs: {
                  'aria-hidden': 'true',
                  class: 'anticon-spin',
                  'data-icon': 'loading',
                  fill: 'currentColor',
                  height: '1em',
                  viewBox: '0 0 1024 1024',
                  width: '1em',
                },
                children: [
                  {
                    attribs: {
                      d: 'M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z',
                    },
                    children: [],
                    name: 'path',
                    namespace: 'http://www.w3.org/2000/svg',
                    next: null,
                    parent: [Circular],
                    prev: null,
                    type: 'tag',
                    'x-attribsNamespace': {
                      d: undefined,
                    },
                    'x-attribsPrefix': {
                      d: undefined,
                    },
                  },
                ],
                name: 'svg',
                namespace: 'http://www.w3.org/2000/svg',
                next: null,
                parent: [Circular],
                prev: null,
                type: 'tag',
                'x-attribsNamespace': {
                  'aria-hidden': undefined,
                  class: undefined,
                  'data-icon': undefined,
                  fill: undefined,
                  height: undefined,
                  viewBox: undefined,
                  width: undefined,
                },
                'x-attribsPrefix': {
                  'aria-hidden': undefined,
                  class: undefined,
                  'data-icon': undefined,
                  fill: undefined,
                  height: undefined,
                  viewBox: undefined,
                  width: undefined,
                },
              },
            ],
            name: 'i',
            namespace: 'http://www.w3.org/1999/xhtml',
            next: null,
            parent: [Circular],
            prev: null,
            type: 'tag',
            'x-attribsNamespace': {
              'aria-label': undefined,
              class: undefined,
            },
            'x-attribsPrefix': {
              'aria-label': undefined,
              class: undefined,
            },
          },
        ],
        name: 'button',
        namespace: 'http://www.w3.org/1999/xhtml',
        next: null,
        parent: null,
        prev: null,
        root: {
          attribs: {},
          children: [
            [Circular],
          ],
          name: 'root',
          namespace: 'http://www.w3.org/1999/xhtml',
          next: null,
          parent: null,
          prev: null,
          type: 'root',
          'x-attribsNamespace': {},
          'x-attribsPrefix': {},
        },
        type: 'tag',
        'x-attribsNamespace': {
          class: undefined,
          colors: undefined,
          timeout: undefined,
          type: undefined,
        },
        'x-attribsPrefix': {
          class: undefined,
          colors: undefined,
          timeout: undefined,
          type: undefined,
        },
      },
      ---
      _root: [Circular],
      length: 1,
      options: {
        decodeEntities: true,
        normalizeWhitespace: false,
        withDomLvl1: true,
        xml: false,
      },
    ]