12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- // Jest Snapshot v1, https://goo.gl/fbAQLP
- exports[`destructuring.js 1`] = `
- const [one, two = null, three = null] = arr;
- a = ([s=1,]) => 1
- const { children, ...props } = this.props
- const { user: { firstName, lastName } } = this.props;
- const {
- name: { first, last },
- organisation: { address: { street: orgStreetAddress, postcode: orgPostcode } }
- } = user;
- function f({ data: { name } }) {}
- const UserComponent = function({
- name: { first, last },
- organisation: { address: { street: orgStreetAddress, postcode: orgPostcode } },
- }) {
- return
- };
- const { a, b, c, d: { e } } = someObject;
- try {
- // code
- } catch ({ data: { message }}) {
- // code
- }
- try {
- // code
- } catch ({ data: { message: { errors }}}) {
- // code
- }
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- const [one, two = null, three = null] = arr;
- a = ([s = 1]) => 1;
- const { children, ...props } = this.props;
- const {
- user: { firstName, lastName }
- } = this.props;
- const {
- name: { first, last },
- organisation: {
- address: { street: orgStreetAddress, postcode: orgPostcode }
- }
- } = user;
- function f({ data: { name } }) {}
- const UserComponent = function({
- name: { first, last },
- organisation: {
- address: { street: orgStreetAddress, postcode: orgPostcode }
- }
- }) {
- return;
- };
- const {
- a,
- b,
- c,
- d: { e }
- } = someObject;
- try {
- // code
- } catch ({ data: { message } }) {
- // code
- }
- try {
- // code
- } catch ({
- data: {
- message: { errors }
- }
- }) {
- // code
- }
- `;
|