All files / branch logical.js

100% Statements 49/49
74.07% Branches 40/54
100% Functions 6/6
100% Lines 48/48

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    1x   4x 8x 8x 8x     4x 2x 2x     4x 4x 4x     1x 1x 1x 1x   1x 1x 1x   1x   1x 1x 1x 1x   1x 1x 1x   1x   1x 1x 1x 1x   1x 1x 1x   1x   1x 1x 1x 1x   1x 1x 1x   1x       1x   1x 1x 1x 1x      
/* eslint-disable complexity,no-mixed-operators */
 
const LogicalExpression = (tf1, tf2) => {
 
    for (let i = 0; i < 2; i++) {
        const a = tf1 || tf2;
        const b = tf2 || tf1 || a;
        console.log(b);
    }
 
    if (tf1) {
        const c = tf2 || 2;
        console.log(c);
    }
 
    const c = tf1 && tf2;
    const d = tf2 && tf1 && c;
    console.log(d);
 
};
const LogicalExpression_11 = (tf1, tf2) => {
    const a = tf1 || tf2;
    const b = tf2 || tf1 || a;
    console.log(b);
 
    const c = tf1 && tf2;
    const d = tf2 && tf1 && c;
    console.log(d);
 
    LogicalExpression(tf1, tf2);
};
const LogicalExpression_10 = (tf1, tf2) => {
    const a = tf1 || tf2;
    const b = tf2 || tf1 || a;
    console.log(b);
 
    const c = tf1 && tf2;
    const d = tf2 && tf1 && c;
    console.log(d);
 
    LogicalExpression(tf1, tf2);
};
const LogicalExpression_01 = (tf1, tf2) => {
    const a = tf1 || tf2;
    const b = tf2 || tf1 || a;
    console.log(b);
 
    const c = tf1 && tf2;
    const d = tf2 && tf1 && c;
    console.log(d);
 
    LogicalExpression(tf1, tf2);
};
const LogicalExpression_00 = (tf1, tf2) => {
    const a = tf1 || tf2;
    const b = tf2 || tf1 || a;
    console.log(b);
 
    const c = tf1 && tf2;
    const d = tf2 && tf1 && c;
    console.log(d);
 
    LogicalExpression(tf1, tf2);
};
 
 
module.exports = () => {
 
    LogicalExpression_11(true, true);
    LogicalExpression_10(true, false);
    LogicalExpression_01(false, true);
    LogicalExpression_00(false, false);
 
};