All files / src/jest-serializer NgrxActionArraySerializer.js

100% Statements 7/7
100% Branches 6/6
100% Functions 4/4
100% Lines 6/6

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 17658x   658x 5727x       656x   567x     658x        
const print = (val, serialize) => val.map(serialize).join('\n');
 
const test = val =>
  val instanceof Array &&
  val.length &&
  val.every(
    action =>
      typeof action === 'object' &&
      Object.keys(action).includes('type') &&
      Object.keys(action).filter(key => !['type', 'payload'].includes(key)).length === 0
  );
 
module.exports = {
  print: print,
  test: test,
};