How to use the builders.buildJSXElementEntry function in builders

To help you get started, we’ve selected a few builders examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rtymchyk / babel-plugin-extract-text / test / builders.spec.js View on Github external
value: { value: 'Context' },
            }, {
              name: { name: 'comment' },
              value: { value: 'On homepage' },
            }, {
              name: { name: 'numFriends' },
              value: { value: '10,000' },
            }, {
              name: { name: 'count' },
              value: { value: 10000 },
            }],
          },
        },
      }

      expect(buildJSXElementEntry(types, path, state)).toEqual({
        msgid: 'You have one friend!',
        msgid_plural: 'You have {numFriends} friends!',
        msgctxt: 'Context',
        extracted: 'On homepage',
      })
    })