Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idl1 #6242

Merged
merged 2 commits into from
Feb 4, 2021
Merged

Idl1 #6242

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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