Help needed with Sudoku solver

Tell us what’s happening:

FCC testing of my unit tests won’t pass.

It seems assertion-analyser.js doesn’t pick up the assertion (assert.throw()) in my test Invalid string when I log them to the console (see below):

Skärmavbild 2021-01-25 kl. 15.51.32

What did I forgot? Is the assertion-analyser.js not intended for error testing?

Please make my day! :grinning:

Your code so far

test('Invalid string', function(done) {
  let invalidString = '1.5..2.84..63.12.7.2..5.....9..1....8.2.3674.3.7.2..9.47...8..1..16....923914.67.';
  assert.throws(() => solver.solve(invalidString), /Puzzle cannot be solved/);
  done();
});

Link to my code

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:84.0) Gecko/20100101 Firefox/84.0.

Challenge: Sudoku Solver

Link to the challenge:

Added assert.fail() and moved assert.throws() inside try...catch statement.

fcctesting.js seems to pass all 12 unit tests when logged to the console:

Skärmavbild 2021-01-26 kl. 13.51.22

Still it won’t pass the FCC testing… :grimacing:

“The devil is in the details.” (German proverb)

Some time along the way I changed suite('UnitTests', () => { to suite('Unit Tests', () => {

Do not. It will cause your unit tests to fail…