Ad
  • Custom User Avatar
  • Custom User Avatar

    checks for negative numbers

  • Custom User Avatar

    Enjoy your report

  • Default User Avatar

    This comment has been deleted.

  • Custom User Avatar

    The kata there is a sentence:
    "..It should find two different items in the array"

    The point there is about finding different values in context of array (different indices of values, not values itself)

    Description should be fixed to clarify it

  • Custom User Avatar

    The sentence "as a set of strings" has been added to the description. This is enough?

  • Custom User Avatar

    Approved

  • Custom User Avatar

    Python fork

    • Changed solution setup to use spaces instead of tabs
  • Default User Avatar

    This is covered by the following part of the description:

    Any other pattern matches if pattern[matchesSymbol](input) is truthy. The matchesSymbol variable is preloaded, and the solution must use it to define one or more properties, each on a standard prototype (e.g. Object.prototype).

    To expand: patternMatch is supposed to use [matchesSymbol] on whatever it's given, and with its logic written that way you then need to define [matchesSymbol] properties on built-in prototypes for it to behave correctly. Technically you could just define Object.prototype[matchesSymbol], but it wouldn't be a very good way to do it.

  • Default User Avatar

    The test you mentioned does look incorrect to me, but I can't reproduce the issue or figure out how it might have happened.

    I've re-validated my own solution a few times with no issues, so if you are getting a lot of randomised test failures it is probably an issue with your solution.

  • Default User Avatar

    toString isn't considered and isn't supposed to have an effect on anything, but valueOf matters and is hinted at by the description at one point.

  • Default User Avatar

    This should be covered by the primitive tests.

  • Default User Avatar

    What this is saying is that there is no special handling for a non-existent property and it should be treated the same as if it existed but had an undefined value. Sometimes things behave differently based on that, i.e. in some cases, if we have the following code:

    const objA = { prop: undefined };
    const objB = {};
    

    Some things will treat objA and objB differently, even though objA.prop and objB.prop are both undefined. We don't want any special handling here, so the patterns { prop: undefined } and { prop: () => true } should match both objA and objB.

  • Default User Avatar

    Possibly the confusion here is because that test is checking for [matchesSymbol] on Number (a function) and not Number.prototype.

  • Default User Avatar

    As with Symbols, Sets are supposed to be compared with ===. The __name thing is used by the tests for display purposes, it isn't supposed to be accessed by the solution.

  • Loading more items...