# All files / src/user-event/event-builder common.ts

100% Statements 4/4
100% Branches 0/0
100% Functions 3/3
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    494x

    37x

    13x

    13x

     export const CommonEventBuilder = {
      /**
       * Experimental values:
       * - iOS: `{"changedTouches": [[Circular]], "identifier": 1, "locationX": 253, "locationY": 30.333328247070312, "pageX": 273, "pageY": 141.3333282470703, "target": 75, "timestamp": 875928682.0450834, "touches": [[Circular]]}`
       * - Android: `{"changedTouches": [[Circular]], "identifier": 0, "locationX": 160, "locationY": 40.3636360168457, "pageX": 180, "pageY": 140.36363220214844, "target": 53, "targetSurface": -1, "timestamp": 10290805, "touches": [[Circular]]}`
       */
      touch: () => {
        return {
          nativeEvent: {
            changedTouches: [],
            identifier: 0,
            locationX: 0,
            locationY: 0,
            pageX: 0,
            pageY: 0,
            target: 0,
            timestamp: 0,
            touches: [],
          },
        };
      },

      /**
       * Experimental values:
       * - iOS: `{"eventCount": 0, "target": 75, "text": ""}`
       * - Android: `{"target": 53}`
       */
      focus: () => {
        return {
          nativeEvent: {
            target: 0,
          },
        };
      },

      /**
       * Experimental values:
       * - iOS: `{"eventCount": 0, "target": 75, "text": ""}`
       * - Android: `{"target": 53}`
       */
      blur: () => {
        return {
          nativeEvent: {
            target: 0,
          },
        };
      },
    };