@@ -4172,6 +4172,7 @@ describe('AmplitudeClient', function () {
4172
4172
beforeEach ( function ( ) {
4173
4173
reset ( ) ;
4174
4174
} ) ;
4175
+
4175
4176
it ( 'should use default library options' , function ( ) {
4176
4177
amplitude . init ( apiKey ) ;
4177
4178
amplitude . logEvent ( 'Event Type 1' ) ;
@@ -4189,41 +4190,20 @@ describe('AmplitudeClient', function () {
4189
4190
assert . equal ( version , '1.0-test' ) ;
4190
4191
} ) ;
4191
4192
4192
- it ( 'should change library when set with method' , function ( ) {
4193
- amplitude . init ( apiKey ) ;
4194
- amplitude . setLibrary ( 'test-library' , '1.0-test' ) ;
4195
- amplitude . logEvent ( 'Event Type 2' ) ;
4196
-
4197
- const { name, version } = JSON . parse ( queryString . parse ( server . requests [ 0 ] . requestBody ) . e ) [ 0 ] . library ;
4198
-
4199
- assert . equal ( name , 'test-library' ) ;
4200
- assert . equal ( version , '1.0-test' ) ;
4201
- } ) ;
4202
- } ) ;
4203
-
4204
- describe ( 'libraryName' , function ( ) {
4205
- beforeEach ( function ( ) {
4206
- reset ( ) ;
4207
- } ) ;
4208
4193
it ( 'should use the customize library name and default library version' , function ( ) {
4209
4194
amplitude . init ( apiKey ) ;
4210
- amplitude . setLibraryName ( 'test-library' ) ;
4195
+ amplitude . setLibrary ( 'test-library' , undefined ) ;
4211
4196
amplitude . logEvent ( 'Event Type' ) ;
4212
4197
4213
4198
const { name, version } = JSON . parse ( queryString . parse ( server . requests [ 0 ] . requestBody ) . e ) [ 0 ] . library ;
4214
4199
4215
4200
assert . equal ( name , 'test-library' ) ;
4216
4201
assert . equal ( version , amplitude . options . library . version ) ;
4217
4202
} ) ;
4218
- } ) ;
4219
4203
4220
- describe ( 'libraryVersion' , function ( ) {
4221
- beforeEach ( function ( ) {
4222
- reset ( ) ;
4223
- } ) ;
4224
4204
it ( 'should use the customize library version and default library name' , function ( ) {
4225
4205
amplitude . init ( apiKey ) ;
4226
- amplitude . setLibraryVersion ( '1.0-test' ) ;
4206
+ amplitude . setLibrary ( undefined , '1.0-test' ) ;
4227
4207
amplitude . logEvent ( 'Event Type' ) ;
4228
4208
4229
4209
const { name, version } = JSON . parse ( queryString . parse ( server . requests [ 0 ] . requestBody ) . e ) [ 0 ] . library ;
0 commit comments