Skip to content

Commit

Permalink
Idl1 (prebid#6242)
Browse files Browse the repository at this point in the history
* Renaming idLibrary to idImportLibrary

* Renaming idLibrary to idImportLibrary

Co-authored-by: skocheri <[email protected]>
  • Loading branch information
2 people authored and icflournoy committed Feb 5, 2021
1 parent b9a26d4 commit 6179723
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion modules/idLibrary.js → modules/idImportLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,4 @@ export function setConfig(config) {
associateIds();
}

config.getConfig('idLibrary', config => setConfig(config.idLibrary));
config.getConfig('idImportLibrary', config => setConfig(config.idImportLibrary));
4 changes: 2 additions & 2 deletions modules/idLibrary.md → modules/idImportLibrary.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ID Library
# ID Import Library

## Configuration Options

Expand All @@ -13,7 +13,7 @@

```javascript
pbjs.setConfig({
idLibrary: {
idImportLibrary: {
target: 'username',
url: 'https://example.com',
debounce: 250,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as utils from 'src/utils.js';
import * as idlibrary from 'modules/idLibrary.js';
import * as idImportlibrary from 'modules/idImportLibrary.js';

var expect = require('chai').expect;

Expand All @@ -20,7 +20,7 @@ describe('currency', function () {
utils.logInfo.restore();
utils.logError.restore();
fakeCurrencyFileServer.restore();
idlibrary.setConfig({});
idImportlibrary.setConfig({});
});

describe('setConfig', function () {
Expand All @@ -35,26 +35,26 @@ describe('currency', function () {
});

it('results when no config available', function () {
idlibrary.setConfig({});
idImportlibrary.setConfig({});
sinon.assert.called(utils.logError);
});
it('results with config available', function () {
idlibrary.setConfig({ 'url': 'URL' });
idImportlibrary.setConfig({ 'url': 'URL' });
sinon.assert.called(utils.logInfo);
});
it('results with config default debounce ', function () {
let config = { 'url': 'URL' }
idlibrary.setConfig(config);
idImportlibrary.setConfig(config);
expect(config.debounce).to.be.equal(250);
});
it('results with config default fullscan ', function () {
let config = { 'url': 'URL' }
idlibrary.setConfig(config);
idImportlibrary.setConfig(config);
expect(config.fullscan).to.be.equal(false);
});
it('results with config fullscan ', function () {
let config = { 'url': 'URL', 'fullscan': true }
idlibrary.setConfig(config);
idImportlibrary.setConfig(config);
expect(config.fullscan).to.be.equal(true);
});
});
Expand Down

0 comments on commit 6179723

Please sign in to comment.