|
@@ -26,6 +26,26 @@ describe('@jupyterlab/coreutils', () => {
|
|
|
|
|
|
});
|
|
|
|
|
|
+ describe('#setOption()', () => {
|
|
|
+
|
|
|
+ it('should get last option value and set it to the passed value', () => {
|
|
|
+ expect(PageConfig.setOption('foo', 'bar1')).to.equal('bar');
|
|
|
+ });
|
|
|
+
|
|
|
+ it('should get a known option', () => {
|
|
|
+ expect(PageConfig.getOption('foo')).to.equal('bar1');
|
|
|
+ });
|
|
|
+
|
|
|
+ it('should add a new option', () => {
|
|
|
+ expect(PageConfig.setOption('bar', 'foo')).to.equal('');
|
|
|
+ });
|
|
|
+
|
|
|
+ it('should get a known option', () => {
|
|
|
+ expect(PageConfig.getOption('bar')).to.equal('foo');
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
describe('#getBaseUrl()', () => {
|
|
|
|
|
|
it('should get the base url of the page', () => {
|