Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
WIP: isAppConfigDifferent not working nested properties
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisalmen committed Nov 9, 2023
1 parent bdd2f0b commit fe83b58
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/monaco-editor-wrapper/test/editorAppClassic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,16 @@ describe('Test EditorAppClassic', () => {
const app = new EditorAppClassic('config defaults', config);
expect(app.getConfig().editorOptions?.['semanticHighlighting.enabled']).toEqual('configuredByTheme');
});

test('isAppConfigDifferent: non-simple properties"', () => {
const config1 = buildConfig();
const config2 = buildConfig();
const configclassic1 = config1.wrapperConfig.editorAppConfig as EditorAppConfigClassic;
configclassic1.editorOptions!['semanticHighlighting.enabled'] = true;
const configclassic2 = config2.wrapperConfig.editorAppConfig as EditorAppConfigClassic;
configclassic2.editorOptions!['semanticHighlighting.enabled'] = true;

const app = new EditorAppClassic('config defaults', config1);
expect(app.isAppConfigDifferent(configclassic1, configclassic2, false)).toEqual(false);
});
});

0 comments on commit fe83b58

Please sign in to comment.