@@ -245,7 +245,7 @@ describe('Amplitude', function() {
245245
246246 amplitude . init ( apiKey ) ;
247247 assert . equal ( amplitude . options . apiKey , apiKey ) ;
248- assert . lengthOf ( amplitude . options . deviceId , 37 ) ;
248+ assert . lengthOf ( amplitude . options . deviceId , 22 ) ;
249249 } ) ;
250250
251251 it ( 'should accept userId' , function ( ) {
@@ -255,8 +255,7 @@ describe('Amplitude', function() {
255255
256256 it ( 'should generate a random deviceId' , function ( ) {
257257 amplitude . init ( apiKey , userId ) ;
258- assert . lengthOf ( amplitude . options . deviceId , 37 ) ; // UUID is length 36, but we append 'R' at end
259- assert . equal ( amplitude . options . deviceId [ 36 ] , 'R' ) ;
258+ assert . lengthOf ( amplitude . options . deviceId , 22 ) ;
260259 } ) ;
261260
262261 it ( 'should validate config values' , function ( ) {
@@ -285,7 +284,7 @@ describe('Amplitude', function() {
285284 var stored = amplitude . getInstance ( ) . _metadataStorage . load ( ) ;
286285 assert . property ( stored , 'deviceId' ) ;
287286 assert . propertyVal ( stored , 'userId' , userId ) ;
288- assert . lengthOf ( stored . deviceId , 37 ) ; // increase deviceId length by 1 for 'R' character
287+ assert . lengthOf ( stored . deviceId , 22 )
289288 } ) ;
290289
291290 it ( 'should set language' , function ( ) {
@@ -654,8 +653,7 @@ describe('setVersionName', function() {
654653 amplitude . init ( apiKey , null , { 'deviceId' : deviceId } ) ;
655654 amplitude . regenerateDeviceId ( ) ;
656655 assert . notEqual ( amplitude . options . deviceId , deviceId ) ;
657- assert . lengthOf ( amplitude . options . deviceId , 37 ) ;
658- assert . equal ( amplitude . options . deviceId [ 36 ] , 'R' ) ;
656+ assert . lengthOf ( amplitude . options . deviceId , 22 ) ;
659657 } ) ;
660658 } ) ;
661659
0 commit comments