Skip to content

Commit ba265a8

Browse files
committed
added test for options
1 parent 2b31d15 commit ba265a8

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

test/bigtable/index.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,24 @@ describe('Bigtable', function() {
110110
fakeUtil.normalizeArguments = normalizeArguments;
111111
});
112112

113+
it('should leave the original options unaltered', function() {
114+
var fakeOptions = {
115+
a: 'a',
116+
b: 'b',
117+
c: 'c',
118+
zone: 'zone'
119+
};
120+
121+
var bigtable = new Bigtable(fakeOptions);
122+
var options = bigtable.calledWith_[1];
123+
124+
for (var option in fakeOptions) {
125+
assert.strictEqual(fakeOptions[option], options[option]);
126+
}
127+
128+
assert.notStrictEqual(fakeOptions, options);
129+
});
130+
113131
it('should localize the cluster name', function() {
114132
assert.strictEqual(bigtable.clusterName, CLUSTER_NAME);
115133
});

0 commit comments

Comments
 (0)