Ad
  • Custom User Avatar
    assert.strictEqual(addTime("90 sec","0.5 min","minute"), 1.5);  => wrong
    assert.strictEqual(addTime("1 hour","1380 min","day"), 1);      => wrong
    assert.strictEqual(addTime("120 min","60 sec","hour"), 2.0166666666666666);
                                                  ^^^^^=> goes against specifications
    

    I suggest you get your previous kata right before trying to author more of them.

    Thx

  • Custom User Avatar
      it("Big Number Test", function() {
        assert.strictEqual(addTime("1234567890000000000 hour","9876543210000000 day","second"), 5.297777737344e+21);
        assert.strictEqual(addTime("1045312318272019 sec","104531231827.2019 min","hour"), 292106720050.45526);
        assert.strictEqual(addTime("12345678987654321 day","30000000000 min","minute"), 17777777772222220000);
      });
    

    Please no. These numbers aren't exact in any way. They're subject to floating point errors, which means their values can change just by changing the order of calculation. See this

  • Custom User Avatar
    • instances should be named in snakeCase camelCase, not TitleCase (that's for classes
    • a File instance shouldn't be named with somehting like test=> file1, ...2, ...
    • name1 and name2 do not make sense
    • Get It: File.name1 -> what does that mean? (here you see why proper naming helps...)
    • examples are not speicifcations. Currently, without the examples, half of the requirements are missing, and/or it's not even possible to know which is what and do what. => the description needs to be rewritten (entirely). I strongly suggest you write the interface as a whole, with all the details needed (as text), and only then provide the examples)
    • link section:
      • If file's expand name is lnk then allow use it. -> not understandable. What do you mean?
      • a link should be done feeding the instance with another instance of File. If not, it should be specifdied (and tested) that the related File exist/is valid. Otherwise the existence of link makes no sense. But this is not easily testable (unless you actually write files on the disk), so back to point one: the link should be created providing a File instance.
      • defining a link should update the extension one shot, not in 2 different actions as shown in the example. And this must be correctly specified.
      • the "special" section is about specs => should be given before the example
    • Default: ., in content section => ???
  • Custom User Avatar

    The initial code is missing delete method.

  • Custom User Avatar
    Please check you File class setExpandname void: expected false to equal true
    

    This is equivalent to using assert.fail; it does not provide any feedback why the test failed, what value is being checked, and what is the expected/actual value.

  • Custom User Avatar

    Why are there no sample tests? Is there any good reason not to provide them?

    Also, random tests are missing.

  • Custom User Avatar

    the ref solution is wrong (Base 32 has precedence over base 16, which is wrong)

    needs either to be fixed or properly described.