@@ -217,6 +217,12 @@ describe('Bigtable/Table', function() {
217217 describe ( 'createFamily' , function ( ) {
218218 var COLUMN_ID = 'my-column' ;
219219
220+ it ( 'should throw if a name is not provided' , function ( ) {
221+ assert . throws ( function ( ) {
222+ table . createFamily ( ) ;
223+ } , / A n a m e i s r e q u i r e d t o c r e a t e a f a m i l y \. / ) ;
224+ } ) ;
225+
220226 it ( 'should provide the proper request options' , function ( done ) {
221227 table . request = function ( grpcOpts , reqOpts ) {
222228 assert . deepEqual ( grpcOpts , {
@@ -357,6 +363,12 @@ describe('Bigtable/Table', function() {
357363 describe ( 'family' , function ( ) {
358364 var FAMILY_ID = 'test-family' ;
359365
366+ it ( 'should throw if a name is not provided' , function ( ) {
367+ assert . throws ( function ( ) {
368+ table . family ( ) ;
369+ } , / A f a m i l y n a m e m u s t b e p r o v i d e d \. / ) ;
370+ } ) ;
371+
360372 it ( 'should create a family with the proper arguments' , function ( ) {
361373 var family = table . family ( FAMILY_ID ) ;
362374
@@ -806,14 +818,20 @@ describe('Bigtable/Table', function() {
806818 } ) ;
807819
808820 describe ( 'row' , function ( ) {
809- var ROW_ID = 'test-row' ;
821+ var KEY = 'test-row' ;
822+
823+ it ( 'should throw if a key is not provided' , function ( ) {
824+ assert . throws ( function ( ) {
825+ table . row ( ) ;
826+ } , / A r o w k e y m u s t b e p r o v i d e d \. / ) ;
827+ } ) ;
810828
811829 it ( 'should return a Row object' , function ( ) {
812- var row = table . row ( ROW_ID ) ;
830+ var row = table . row ( KEY ) ;
813831
814832 assert ( row instanceof FakeRow ) ;
815833 assert . strictEqual ( row . calledWith_ [ 0 ] , table ) ;
816- assert . strictEqual ( row . calledWith_ [ 1 ] , ROW_ID ) ;
834+ assert . strictEqual ( row . calledWith_ [ 1 ] , KEY ) ;
817835 } ) ;
818836 } ) ;
819837
0 commit comments