Skip to content

Commit

Permalink
test: use strictEqual in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith committed Jul 18, 2018
1 parent 9fc0fc5 commit 3ccdb76
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 91 deletions.
2 changes: 1 addition & 1 deletion samples/system-test/tables.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ test.serial(`should load a local file`, async t => {
.dataset(datasetId)
.table(tableId)
.getRows();
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
})
.start();
});
Expand Down
16 changes: 8 additions & 8 deletions samples/tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function copyTable(
const job = results[0];

// load() waits for the job to finish
assert.equal(job.status.state, 'DONE');
assert.strictEqual(job.status.state, 'DONE');
console.log(`Job ${job.id} completed.`);

// Check the job's status for errors
Expand Down Expand Up @@ -225,7 +225,7 @@ function loadLocalFile(datasetId, tableId, filename, projectId) {
const job = results[0];

// load() waits for the job to finish
assert.equal(job.status.state, 'DONE');
assert.strictEqual(job.status.state, 'DONE');
console.log(`Job ${job.id} completed.`);

// Check the job's status for errors
Expand Down Expand Up @@ -292,7 +292,7 @@ function loadParquetFromGCS(datasetId, tableId, projectId) {
const job = results[0];

// load() waits for the job to finish
assert.equal(job.status.state, 'DONE');
assert.strictEqual(job.status.state, 'DONE');
console.log(`Job ${job.id} completed.`);

// Check the job's status for errors
Expand Down Expand Up @@ -360,7 +360,7 @@ function loadCSVFromGCS(datasetId, tableId, projectId) {
const job = results[0];

// load() waits for the job to finish
assert.equal(job.status.state, 'DONE');
assert.strictEqual(job.status.state, 'DONE');
console.log(`Job ${job.id} completed.`);

// Check the job's status for errors
Expand Down Expand Up @@ -423,7 +423,7 @@ function loadCSVFromGCSAutodetect(datasetId, tableId, projectId) {
const job = results[0];

// load() waits for the job to finish
assert.equal(job.status.state, 'DONE');
assert.strictEqual(job.status.state, 'DONE');
console.log(`Job ${job.id} completed.`);

// Check the job's status for errors
Expand Down Expand Up @@ -493,7 +493,7 @@ function loadCSVFromGCSAppend(datasetId, tableId, projectId) {
const job = results[0];

// load() waits for the job to finish
assert.equal(job.status.state, 'DONE');
assert.strictEqual(job.status.state, 'DONE');
console.log(`Job ${job.id} completed.`);

// Check the job's status for errors
Expand Down Expand Up @@ -563,7 +563,7 @@ function loadCSVFromGCSTruncate(datasetId, tableId, projectId) {
const job = results[0];

// load() waits for the job to finish
assert.equal(job.status.state, 'DONE');
assert.strictEqual(job.status.state, 'DONE');
console.log(`Job ${job.id} completed.`);

// Check the job's status for errors
Expand Down Expand Up @@ -617,7 +617,7 @@ function extractTableToGCS(
const job = results[0];

// load() waits for the job to finish
assert.equal(job.status.state, 'DONE');
assert.strictEqual(job.status.state, 'DONE');
console.log(`Job ${job.id} completed.`);

// Check the job's status for errors
Expand Down
66 changes: 33 additions & 33 deletions system-test/bigquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ describe('BigQuery', function() {
rowsEmitted.push(row);
})
.on('end', function() {
assert.equal(rowsEmitted.length, 100);
assert.equal(typeof rowsEmitted[0].url, 'string');
assert.strictEqual(rowsEmitted.length, 100);
assert.strictEqual(typeof rowsEmitted[0].url, 'string');
done();
});
});
Expand Down Expand Up @@ -319,19 +319,19 @@ describe('BigQuery', function() {
.createQueryStream(query)
.on('data', function(row) {
rowsEmitted++;
assert.equal(typeof row.url, 'string');
assert.strictEqual(typeof row.url, 'string');
})
.on('error', done)
.on('end', function() {
assert.equal(rowsEmitted, 100);
assert.strictEqual(rowsEmitted, 100);
done();
});
});

it('should query', function(done) {
bigquery.query(query, function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 100);
assert.strictEqual(rows.length, 100);
done();
});
});
Expand All @@ -344,8 +344,8 @@ describe('BigQuery', function() {
},
function(err, rows, nextQuery) {
assert.ifError(err);
assert.equal(rows.length, 10);
assert.equal(typeof nextQuery.pageToken, 'string');
assert.strictEqual(rows.length, 10);
assert.strictEqual(typeof nextQuery.pageToken, 'string');
done();
}
);
Expand Down Expand Up @@ -416,7 +416,7 @@ describe('BigQuery', function() {

dataset.getMetadata(function(err, metadata) {
assert.ifError(err);
assert.equal(metadata.description, 'yay description');
assert.strictEqual(metadata.description, 'yay description');
done();
});
}
Expand Down Expand Up @@ -762,7 +762,7 @@ describe('BigQuery', function() {

table.getMetadata(function(err, metadata) {
assert.ifError(err);
assert.equal(metadata.description, 'catsandstuff');
assert.strictEqual(metadata.description, 'catsandstuff');
done();
});
}
Expand Down Expand Up @@ -999,7 +999,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1018,7 +1018,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1037,7 +1037,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1055,7 +1055,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1074,7 +1074,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1088,7 +1088,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 5);
assert.strictEqual(rows.length, 5);
done();
}
);
Expand All @@ -1112,7 +1112,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1131,7 +1131,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1145,7 +1145,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1159,7 +1159,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1173,7 +1173,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1193,7 +1193,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1215,7 +1215,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1236,7 +1236,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1257,7 +1257,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1277,7 +1277,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1298,7 +1298,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1314,7 +1314,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 5);
assert.strictEqual(rows.length, 5);
done();
}
);
Expand All @@ -1338,7 +1338,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1359,7 +1359,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1375,7 +1375,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1391,7 +1391,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1407,7 +1407,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand All @@ -1432,7 +1432,7 @@ describe('BigQuery', function() {
},
function(err, rows) {
assert.ifError(err);
assert.equal(rows.length, 1);
assert.strictEqual(rows.length, 1);
done();
}
);
Expand Down
Loading

0 comments on commit 3ccdb76

Please sign in to comment.