Newbie here, trying to use Chai to validate that the text of a logInButton = Entrar. The test runs and passes visually but it keeps failing.
0 passing (73ms) 1 failing
AssertionError: expected 'logInButton' to equal 'Entrar'
+ expected - actual
-logInButton
+Entrar
Code:
var assert = require('chai').assert
logInButton = 'Entrar'
assert.strictEqual('logInButton', 'Entrar');
err(function () {
assert.notStrictEqual('logInButton', Entrar);
}, "Expected 'logInButton' to equal 'Entrar'");
What am I doing wrong?
I'm not very familiar with
node.js, but I think you want something like this:With:
you are comparing two strings - 'logInButton' and 'Entrar', which of cource are not equal.