Skip to content

Commit

Permalink
Add UT for defaultPanel config
Browse files Browse the repository at this point in the history
  • Loading branch information
rogup authored and Nick Stokoe committed Mar 19, 2024
1 parent a78026a commit 928fd8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion test/configs/typical/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
"disableClusteringAtZoom": 10,
"maxZoomOnGroup":12,
"maxZoomOnOne": 14,
"maxZoomOnSearch": 12
"maxZoomOnSearch": 12,
"defaultPanel": "about",
"defaultOpenSidebar": true
}
4 changes: 2 additions & 2 deletions test/test-model-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use strict';
//const fs = require('fs');
import { assert } from 'chai';
import { init as configBuilder } from '../src/map-app/app/model/config';

Expand All @@ -8,7 +7,6 @@ import rawConfig from './configs/typical/config.json';
import version from './configs/typical/version.json';
const about = `This is a dummy about.html!
`;
//fs.readFileSync('test/configs/typical/about.html');
const combinedConfig = { ...rawConfig, ...version, aboutHtml: about };

describe('The config.js module', function () {
Expand Down Expand Up @@ -39,6 +37,8 @@ describe('The config.js module', function () {
assert.equal(config.getMaxZoomOnOne(), 14);
assert.equal(config.getMaxZoomOnSearch(), 12);
assert.equal(config.logo(), undefined);
assert.equal(config.getDefaultPanel(), "about");
assert.equal(config.getDefaultOpenSidebar(), true);
});
});
});

0 comments on commit 928fd8c

Please sign in to comment.