Palindrome Products test seems to be broken

The spec file starts with Palindromes = require './palindrome-products' and later proceeds to using PalindromeProducts which is reported as not defined. Do I miss something or should it be PalindromeProducts = require './palindrome-products'?

It seems that the problem is present in Pascals Triangle exercise. Let me quote spec:

   Pascal = require './pascals-triangle'
   
   describe 'Pascal', ->
     it 'one row', ->
       pascal = new PascalsTriangle()
[...]

Running the tests say “ReferenceError: PascalsTriangle is not defined”. Do I miss something?

You need to definie I guess a class with the name Pascal Triangle in the solution file.

I did, but it seems that the tests tries to import “Pascal” but uses “PascalsTriangle”. Am I wrong?

No, you seem to be right. The file hasn’t been altered for 3 years, so I just assumed it was a user error. But I did test it myself and I come to the same conclusion that it is a bug

Alright I can confirm that it is fixed.

1 Like