All files / json-path/__tests__ fixtures.ts

100% Statements 5/5
100% Branches 0/0
100% Functions 0/0
100% Lines 5/5

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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86  1x                                   1x                         1x   1x           1x                                                                                          
// Examples from RFC 9535 Table 2
export const bookstore = {
  store: {
    book: [
      {category: 'reference', author: 'Nigel Rees', title: 'Sayings of the Century', price: 8.95},
      {category: 'fiction', author: 'Evelyn Waugh', title: 'Sword of Honour', price: 12.99},
      {category: 'fiction', author: 'Herman Melville', title: 'Moby Dick', isbn: '0-553-21311-3', price: 8.99},
      {
        category: 'fiction',
        author: 'J. R. R. Tolkien',
        title: 'The Lord of the Rings',
        isbn: '0-395-19395-8',
        price: 22.99,
      },
    ],
    bicycle: {color: 'red', price: 399},
  },
};
 
export const data0 = {
  store: {
    book: [
      {title: 'Harry Potter', author: 'J.K. Rowling', price: 8.95},
      {title: 'The Hobbit', author: 'J.R.R. Tolkien', price: 12.99},
    ],
    bicycle: {
      color: 'red',
      price: 399,
    },
  },
};
 
export const arrayData = ['a', 'b', 'c', 'd', 'e', 'f', 'g'];
 
export const complexData = {
  a: [3, 5, 1, 2, 4, 6, {b: 'j'}, {b: 'k'}, {b: {}}, {b: 'kilo'}],
  o: {p: 1, q: 2, r: 3, s: 5, t: {u: 6}},
  e: 'f',
};
 
export const testData = {
  store: {
    book: [
      {
        category: 'reference',
        author: 'Nigel Rees',
        title: 'Sayings of the Century',
        price: 8.95,
      },
      {
        category: 'fiction',
        author: 'Evelyn Waugh',
        title: 'Sword of Honour',
        price: 12.99,
      },
      {
        category: 'fiction',
        author: 'Herman Melville',
        title: 'Moby Dick',
        isbn: '0-553-21311-3',
        price: 8.99,
      },
      {
        category: 'fiction',
        author: 'J. R. R. Tolkien',
        title: 'The Lord of the Rings',
        isbn: '0-395-19395-8',
        price: 22.99,
      },
    ],
    bicycle: {
      color: 'red',
      price: 19.95,
    },
  },
  authors: ['John', 'Jane', 'Bob'],
  info: {
    name: 'Test Store',
    location: 'City',
    contacts: {
      email: 'test@store.com',
      phone: '123-456-7890',
    },
  },
};