Use strict equalities in test/unit/{function_spec, stream_spec, testreporter}.js
This commit is contained in:
parent
e525902241
commit
b0349cd184
@ -10,13 +10,13 @@ describe('function', function() {
|
|||||||
this.addMatchers({
|
this.addMatchers({
|
||||||
toMatchArray: function(expected) {
|
toMatchArray: function(expected) {
|
||||||
var actual = this.actual;
|
var actual = this.actual;
|
||||||
if (actual.length != expected.length) {
|
if (actual.length !== expected.length) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (var i = 0; i < expected.length; i++) {
|
for (var i = 0; i < expected.length; i++) {
|
||||||
var a = actual[i], b = expected[i];
|
var a = actual[i], b = expected[i];
|
||||||
if (isArray(b)) {
|
if (isArray(b)) {
|
||||||
if (a.length != b.length) {
|
if (a.length !== b.length) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (var j = 0; j < a.length; j++) {
|
for (var j = 0; j < a.length; j++) {
|
||||||
|
@ -9,7 +9,7 @@ describe('stream', function() {
|
|||||||
this.addMatchers({
|
this.addMatchers({
|
||||||
toMatchTypedArray: function(expected) {
|
toMatchTypedArray: function(expected) {
|
||||||
var actual = this.actual;
|
var actual = this.actual;
|
||||||
if (actual.length != expected.length) {
|
if (actual.length !== expected.length) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (var i = 0, ii = expected.length; i < ii; i++) {
|
for (var i = 0, ii = expected.length; i < ii; i++) {
|
||||||
|
@ -11,7 +11,7 @@ var TestReporter = function(browser, appPath) {
|
|||||||
r.open('POST', action, true);
|
r.open('POST', action, true);
|
||||||
r.setRequestHeader('Content-Type', 'application/json');
|
r.setRequestHeader('Content-Type', 'application/json');
|
||||||
r.onreadystatechange = function sendTaskResultOnreadystatechange(e) {
|
r.onreadystatechange = function sendTaskResultOnreadystatechange(e) {
|
||||||
if (r.readyState == 4) {
|
if (r.readyState === 4) {
|
||||||
// Retry until successful
|
// Retry until successful
|
||||||
if (r.status !== 200) {
|
if (r.status !== 200) {
|
||||||
send(action, json, cb);
|
send(action, json, cb);
|
||||||
|
Loading…
Reference in New Issue
Block a user