Ad
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    You'll have to code a function getIngredients(recipes, final, amount)

    There's no amount parameter in the initial solution, and it seems no argument is ever provided for it in the tests.

  • Custom User Avatar

    Approved some time ago

  • Custom User Avatar

    Tests are not working properly, throw an error :
    ReferenceError: Test is not defined
    at /workspace/node/test.js:59:1
    ...

  • Default User Avatar

    'alr approved some time ago'

  • Default User Avatar

    I think for avoiding misundestanding you should clarify this moments, thank you :)

  • Custom User Avatar

    Duplicate issue.

  • Custom User Avatar

    onij [big]: sort by size, from smallest to biggest

    Test 61/100: onarij-ar onij

    expected [ { name: 'puppy', type: 'potion', color: 'purple', size: 20 },
      { name: 'lamp', type: 'potion', color: 'purple', size: 38 },
      { name: 'teardrop', type: 'furniture', color: 'red', size: 60 },
      { name: 'socks', type: 'clothing', color: 'yellow', size: 65 },
      { name: 'glass', type: 'furniture', color: 'green', size: 67 },
      { name: 'wand', type: 'potion', color: 'red', size: 70 },
      { name: 'socks', type: 'clothing', color: 'purple', size: 71 },
      { name: 'scarf', type: 'tool', color: 'orange', size: 95 },
      { name: 'plushie', type: 'clothing', color: 'green', size: 99 },
      { name: 'vest', type: 'furniture', color: 'red', size: 101 },
      { name: 'scarf', type: 'clothing', color: 'red', size: 105 } ]
      
      to deeply equal
      
      [ { name: 'wand', type: 'potion', color: 'red', size: 70 },
      { name: 'puppy', type: 'potion', color: 'purple', size: 20 },
      { name: 'lamp', type: 'potion', color: 'purple', size: 38 },
      { name: 'teardrop', type: 'furniture', color: 'red', size: 60 },
      { name: 'socks', type: 'clothing', color: 'yellow', size: 65 },
      { name: 'glass', type: 'furniture', color: 'green', size: 67 },
      { name: 'socks', type: 'clothing', color: 'purple', size: 71 },
      { name: 'scarf', type: 'tool', color: 'orange', size: 95 },
      { name: 'plushie', type: 'clothing', color: 'green', size: 99 },
      { name: 'vest', type: 'furniture', color: 'red', size: 101 },
      { name: 'scarf', type: 'clothing', color: 'red', size: 105 } ]
    

    The first value in the kata's shouldBe has a size greater than the next one.

  • Custom User Avatar
    Order by size:
    
    Actual:
    [ { name: 'puppy', type: 'potion', color: 'blue', size: 10 },
      { name: 'puppy', type: 'potion', color: 'blue', size: 13 },
      { name: 'lamp', type: 'animal', color: 'purple', size: 19 },
      { name: 'scarf', type: 'potion', color: 'green', size: 28 },
      { name: 'glass', type: 'animal', color: 'purple', size: 36 },
      { name: 'pillow', type: 'furniture', color: 'red', size: 37 } ]
    
    Expected:
    [ { name: 'pillow', type: 'furniture', color: 'red', size: 37 },
      { name: 'puppy', type: 'potion', color: 'blue', size: 10 },
      { name: 'puppy', type: 'potion', color: 'blue', size: 13 },
      { name: 'lamp', type: 'animal', color: 'purple', size: 19 },
      { name: 'scarf', type: 'potion', color: 'green', size: 28 },
      { name: 'glass', type: 'animal', color: 'purple', size: 36 } ]
    
  • Custom User Avatar

    The user's solution may be swapping elements with the same ordering thus failing sometimes, but there're not enough tests to catch this.

  • Custom User Avatar

    I slipped through the cracks with my own solution and confirmed this as an issue.

  • Custom User Avatar

    This is a random test from the reference solution:

     Test 98/100: onarij-ar onij niùn-ij
    expected
    [ { name: 'teardrop', type: 'clothing', color: 'blue', size: 60 },
      { name: 'wand', type: 'tool', color: 'blue', size: 16 },
      { name: 'glass', type: 'animal', color: 'colorless', size: 26 },
      { name: 'vest', type: 'potion', color: 'green', size: 35 },
      { name: 'glass', type: 'potion', color: 'red', size: 39 },
      { name: 'vest', type: 'animal', color: 'yellow', size: 45 },
      { name: 'socks', type: 'potion', color: 'blue', size: 66 },
      { name: 'pants', type: 'furniture', color: 'green', size: 67 },
      { name: 'lamp', type: 'furniture', color: 'yellow', size: 72 },
      { name: 'vest', type: 'tool', color: 'green', size: 96 },
      { name: 'plushie', type: 'potion', color: 'yellow', size: 102 }
    ]
    to deeply equal
    [ { name: 'teardrop', type: 'clothing', color: 'blue', size: 60 },
      { name: 'wand', type: 'tool', color: 'blue', size: 16 },
      { name: 'glass', type: 'animal', color: 'colorless', size: 26 },
      { name: 'vest', type: 'potion', color: 'green', size: 35 },
      { name: 'glass', type: 'potion', color: 'red', size: 39 },
      { name: 'vest', type: 'animal', color: 'yellow', size: 45 },
      { name: 'socks', type: 'potion', color: 'blue', size: 66 },
      { name: 'pants', type: 'furniture', color: 'green', size: 67 },
      { name: 'lamp', type: 'furniture', color: 'yellow', size: 72 },
      { name: 'vest', type: 'tool', color: 'green', size: 96 },
      { name: 'plushie', type: 'potion', color: 'yellow', size: 102 }
    ]
    

    Something's wrong. Not always, but sometimes, the sorting's wrong for onij.

    I haven't been able to figure out what, sorry.

  • Custom User Avatar

    Expected value for onij seems to -a-l-w-a-y-s- SOMETIMES have a wrong first element. The rest of the list is sorted by size. Haven't yet figured out what element is moved to the front.

    Really seems to be a problem with the reference solution.

  • Custom User Avatar

    Riddle me this:

     Test 36/100: onarij-ar onij
    Log
    [ { name: 'plushie', type: 'potion', color: 'yellow', size: 49 },
      { name: 'socks', type: 'animal', color: 'purple', size: 82 },
      { name: 'pants', type: 'animal', color: 'blue', size: 47 },
      { name: 'glass', type: 'clothing', color: 'blue', size: 109 },
      { name: 'teardrop', type: 'animal', color: 'yellow', size: 100 },
      { name: 'pillow', type: 'animal', color: 'orange', size: 55 },
      { name: 'pillow', type: 'clothing', color: 'colorless', size: 95 },
      { name: 'teardrop', type: 'potion', color: 'orange', size: 46 },
      { name: 'scarf', type: 'animal', color: 'blue', size: 34 },
      { name: 'mandragore', type: 'clothing', color: 'blue', size: 29 },
      { name: 'lamp', type: 'furniture', color: 'blue', size: 98 }
    ]
    
    expected
    [ { name: 'mandragore', type: 'clothing', color: 'blue', size: 29 },
      { name: 'scarf', type: 'animal', color: 'blue', size: 34 },
      { name: 'teardrop', type: 'potion', color: 'orange', size: 46 },
      { name: 'pants', type: 'animal', color: 'blue', size: 47 },
      { name: 'plushie', type: 'potion', color: 'yellow', size: 49 },
      { name: 'pillow', type: 'animal', color: 'orange', size: 55 },
      { name: 'socks', type: 'animal', color: 'purple', size: 82 },
      { name: 'pillow', type: 'clothing', color: 'colorless', size: 95 },
      { name: 'lamp', type: 'furniture', color: 'blue', size: 98 },
      { name: 'teardrop', type: 'animal', color: 'yellow', size: 100 },
      { name: 'glass', type: 'clothing', color: 'blue', size: 109 }
    ]
    to deeply equal
    [ { name: 'pillow', type: 'animal', color: 'orange', size: 55 },
      { name: 'mandragore', type: 'clothing', color: 'blue', size: 29 },
      { name: 'scarf', type: 'animal', color: 'blue', size: 34 },
      { name: 'teardrop', type: 'potion', color: 'orange', size: 46 },
      { name: 'pants', type: 'animal', color: 'blue', size: 47 },
      { name: 'plushie', type: 'potion', color: 'yellow', size: 49 },
      { name: 'socks', type: 'animal', color: 'purple', size: 82 },
      { name: 'pillow', type: 'clothing', color: 'colorless', size: 95 },
      { name: 'lamp', type: 'furniture', color: 'blue', size: 98 },
      { name: 'teardrop', type: 'animal', color: 'yellow', size: 100 },
      { name: 'glass', type: 'clothing', color: 'blue', size: 109 }
    ]
    

    onarij-ar onij seems to be the correct encoding for sort by size; I'm returning sort by size, but I can't even reverse engineer the sorting of the expected value.

    What's going wrong here? Is it me, or is it the random test?

  • Loading more items...