Use const/let in specs, not var

This commit is contained in:
Steve Gravrock
2022-04-16 13:41:44 -07:00
parent 482dc883eb
commit 1166d10e43
111 changed files with 2522 additions and 2675 deletions

View File

@@ -1,16 +1,14 @@
describe('toBeNaN', function() {
it('passes for NaN with a custom .not fail', function() {
var matcher = jasmineUnderTest.matchers.toBeNaN(),
result;
result = matcher.compare(Number.NaN);
const matcher = jasmineUnderTest.matchers.toBeNaN();
const result = matcher.compare(Number.NaN);
expect(result.pass).toBe(true);
expect(result.message).toEqual('Expected actual not to be NaN.');
});
it('fails for anything not a NaN', function() {
var matcher = jasmineUnderTest.matchers.toBeNaN(),
result;
const matcher = jasmineUnderTest.matchers.toBeNaN();
let result;
result = matcher.compare(1);
expect(result.pass).toBe(false);
@@ -29,7 +27,7 @@ describe('toBeNaN', function() {
});
it('has a custom message on failure', function() {
var matcher = jasmineUnderTest.matchers.toBeNaN({
const matcher = jasmineUnderTest.matchers.toBeNaN({
pp: jasmineUnderTest.makePrettyPrinter()
}),
result = matcher.compare(0);