1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | const jsdom_1 = require("../browser/test/jsdom");
|
19 | let disableJSDOM = (0, jsdom_1.enableJSDOM)();
|
20 | const lib_1 = require("@theia/application-package/lib/");
|
21 | const chai_1 = require("chai");
|
22 | const frontend_application_config_provider_1 = require("./frontend-application-config-provider");
|
23 | disableJSDOM();
|
24 | const { DEFAULT } = lib_1.FrontendApplicationConfig;
|
25 | describe('FrontendApplicationConfigProvider', function () {
|
26 | before(() => disableJSDOM = (0, jsdom_1.enableJSDOM)());
|
27 | after(() => disableJSDOM());
|
28 | it('should use defaults when calling `set`', function () {
|
29 | frontend_application_config_provider_1.FrontendApplicationConfigProvider.set({
|
30 | applicationName: DEFAULT.applicationName + ' Something Else',
|
31 | });
|
32 | const config = frontend_application_config_provider_1.FrontendApplicationConfigProvider.get();
|
33 |
|
34 | (0, chai_1.expect)(config.applicationName).not.equal(DEFAULT.applicationName);
|
35 |
|
36 | (0, chai_1.expect)(config.defaultIconTheme).equal(DEFAULT.defaultIconTheme);
|
37 | (0, chai_1.expect)(config.defaultTheme).deep.equal(DEFAULT.defaultTheme);
|
38 | (0, chai_1.expect)(config.electron.windowOptions).deep.equal(DEFAULT.electron.windowOptions);
|
39 | });
|
40 | });
|
41 |
|
\ | No newline at end of file |