Skip to content

Commit

Permalink
chore: assert.deelEqual => assert.deepStrictEqual (#77)
Browse files Browse the repository at this point in the history
* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* style: npm run prettier
  • Loading branch information
jkwlui authored Jul 30, 2018
1 parent 5f2b031 commit cb1fa83
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 26 deletions.
8 changes: 4 additions & 4 deletions packages/google-cloud-dns/system-test/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ const DNS_DOMAIN = process.env.GCLOUD_TESTS_DNS_DOMAIN;

const addition = change.metadata.additions[0];
delete addition.kind;
assert.deepEqual(addition, record.toJSON());
assert.deepStrictEqual(addition, record.toJSON());

done();
});
Expand All @@ -285,7 +285,7 @@ const DNS_DOMAIN = process.env.GCLOUD_TESTS_DNS_DOMAIN;

delete metadata.status;
delete expectedMetadata.status;
assert.deepEqual(metadata, expectedMetadata);
assert.deepStrictEqual(metadata, expectedMetadata);

done();
});
Expand Down Expand Up @@ -363,8 +363,8 @@ const DNS_DOMAIN = process.env.GCLOUD_TESTS_DNS_DOMAIN;
const deleted = change.metadata.deletions[0].rrdatas;
const added = change.metadata.additions[0].rrdatas;

assert.deepEqual(deleted, originalData);
assert.deepEqual(added, newRecord.data);
assert.deepStrictEqual(deleted, originalData);
assert.deepStrictEqual(added, newRecord.data);

done();
});
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-dns/test/change.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('Change', function() {
assert.strictEqual(calledWith.parent, ZONE);
assert.strictEqual(calledWith.baseUrl, '/changes');
assert.strictEqual(calledWith.id, CHANGE_ID);
assert.deepEqual(calledWith.methods, {
assert.deepStrictEqual(calledWith.methods, {
exists: true,
get: true,
getMetadata: true,
Expand Down
17 changes: 10 additions & 7 deletions packages/google-cloud-dns/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const fakePaginator = {
extended = true;
methods = arrify(methods);
assert.strictEqual(Class.name, 'DNS');
assert.deepEqual(methods, ['getZones']);
assert.deepStrictEqual(methods, ['getZones']);
},
streamify: function(methodName) {
return methodName;
Expand All @@ -57,7 +57,7 @@ const fakeUtil = extend({}, util, {
}

promisified = true;
assert.deepEqual(options.exclude, ['zone']);
assert.deepStrictEqual(options.exclude, ['zone']);
},
});
const originalFakeUtil = extend(true, {}, fakeUtil);
Expand Down Expand Up @@ -130,11 +130,14 @@ describe('DNS', function() {

const baseUrl = 'https://www.googleapis.com/dns/v1';
assert.strictEqual(calledWith.baseUrl, baseUrl);
assert.deepEqual(calledWith.scopes, [
assert.deepStrictEqual(calledWith.scopes, [
'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
'https://www.googleapis.com/auth/cloud-platform',
]);
assert.deepEqual(calledWith.packageJson, require('../package.json'));
assert.deepStrictEqual(
calledWith.packageJson,
require('../package.json')
);
});
});

Expand Down Expand Up @@ -187,7 +190,7 @@ describe('DNS', function() {
name: zoneName,
description: '',
});
assert.deepEqual(reqOpts.json, expectedBody);
assert.deepStrictEqual(reqOpts.json, expectedBody);

done();
};
Expand Down Expand Up @@ -343,9 +346,9 @@ describe('DNS', function() {
assert.ifError(err);

// Check the original query wasn't modified.
assert.deepEqual(query, originalQuery);
assert.deepStrictEqual(query, originalQuery);

assert.deepEqual(
assert.deepStrictEqual(
nextQuery,
extend({}, query, {
pageToken: apiResponseWithNextPageToken.nextPageToken,
Expand Down
6 changes: 3 additions & 3 deletions packages/google-cloud-dns/test/record.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const fakeUtil = extend({}, util, {
}

promisified = true;
assert.deepEqual(options.exclude, ['toJSON', 'toString']);
assert.deepStrictEqual(options.exclude, ['toJSON', 'toString']);
},
});

Expand Down Expand Up @@ -111,7 +111,7 @@ describe('Record', function() {
const record = Record.fromZoneRecord_(ZONE, 'a', aRecord);

assert.strictEqual(record.type, 'A');
assert.deepEqual(record.metadata.data, expectedData);
assert.deepStrictEqual(record.metadata.data, expectedData);
assert.strictEqual(record.metadata.name, aRecord.name);
assert.strictEqual(record.metadata.ttl, aRecord.ttl);
});
Expand Down Expand Up @@ -312,7 +312,7 @@ describe('Record', function() {
});
delete expectedRecord.data;

assert.deepEqual(record.toJSON(), expectedRecord);
assert.deepStrictEqual(record.toJSON(), expectedRecord);
});
});

Expand Down
22 changes: 11 additions & 11 deletions packages/google-cloud-dns/test/zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const fakeUtil = extend({}, util, {
}

promisified = true;
assert.deepEqual(options.exclude, ['change', 'record']);
assert.deepStrictEqual(options.exclude, ['change', 'record']);
},
});

Expand Down Expand Up @@ -87,7 +87,7 @@ const fakePaginator = {
extended = true;
methods = arrify(methods);
assert.strictEqual(Class.name, 'Zone');
assert.deepEqual(methods, ['getChanges', 'getRecords']);
assert.deepStrictEqual(methods, ['getChanges', 'getRecords']);
},
streamify: function(methodName) {
return methodName;
Expand Down Expand Up @@ -160,7 +160,7 @@ describe('Zone', function() {
assert.strictEqual(calledWith.parent, dnsInstance);
assert.strictEqual(calledWith.baseUrl, '/managedZones');
assert.strictEqual(calledWith.id, ZONE_NAME);
assert.deepEqual(calledWith.methods, {
assert.deepStrictEqual(calledWith.methods, {
create: true,
exists: true,
get: true,
Expand Down Expand Up @@ -225,7 +225,7 @@ describe('Zone', function() {

zone.request = function(reqOpts) {
assert.strictEqual(reqOpts.json.add, undefined);
assert.deepEqual(reqOpts.json.additions, expectedAdditions);
assert.deepStrictEqual(reqOpts.json.additions, expectedAdditions);
done();
};

Expand All @@ -239,7 +239,7 @@ describe('Zone', function() {

zone.request = function(reqOpts) {
assert.strictEqual(reqOpts.json.delete, undefined);
assert.deepEqual(reqOpts.json.deletions, expectedDeletions);
assert.deepStrictEqual(reqOpts.json.deletions, expectedDeletions);
done();
};

Expand Down Expand Up @@ -370,7 +370,7 @@ describe('Zone', function() {
const recordsToDelete = 'ns';

zone.deleteRecordsByType_ = function(types, callback) {
assert.deepEqual(types, [recordsToDelete]);
assert.deepStrictEqual(types, [recordsToDelete]);
callback();
};

Expand All @@ -381,7 +381,7 @@ describe('Zone', function() {
const recordsToDelete = {a: 'b', c: 'd'};

zone.createChange = function(options, callback) {
assert.deepEqual(options.delete, [recordsToDelete]);
assert.deepStrictEqual(options.delete, [recordsToDelete]);
callback();
};

Expand Down Expand Up @@ -450,7 +450,7 @@ describe('Zone', function() {

it('should delete non-NS and non-SOA records', function(done) {
zone.deleteRecords = function(recordsToDelete, callback) {
assert.deepEqual(recordsToDelete, expectedRecordsToDelete);
assert.deepStrictEqual(recordsToDelete, expectedRecordsToDelete);
callback();
};

Expand Down Expand Up @@ -570,7 +570,7 @@ describe('Zone', function() {
describe('getChanges', function() {
it('should accept only a callback', function(done) {
zone.request = function(reqOpts) {
assert.deepEqual(reqOpts.qs, {});
assert.deepStrictEqual(reqOpts.qs, {});
done();
};

Expand Down Expand Up @@ -649,7 +649,7 @@ describe('Zone', function() {
zone.getChanges({}, function(err, changes, nextQuery) {
assert.ifError(err);

assert.deepEqual(nextQuery, expectedNextQuery);
assert.deepStrictEqual(nextQuery, expectedNextQuery);

done();
});
Expand Down Expand Up @@ -729,7 +729,7 @@ describe('Zone', function() {
zone.getRecords({}, function(err, records, nextQuery) {
assert.ifError(err);

assert.deepEqual(nextQuery, expectedNextQuery);
assert.deepStrictEqual(nextQuery, expectedNextQuery);

done();
});
Expand Down

0 comments on commit cb1fa83

Please sign in to comment.