-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #885 from bpatrik/bugfix/ext-config
Improve extansion loading #847
- Loading branch information
Showing
5 changed files
with
52 additions
and
12 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
test/backend/unit/model/extension/ExtensionConfigWrapper.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {expect} from 'chai'; | ||
import {ExtensionConfigWrapper} from '../../../../../src/backend/model/extension/ExtensionConfigWrapper'; | ||
import {TAGS} from '../../../../../src/common/config/public/ClientConfig'; | ||
|
||
// to help WebStorm to handle the test cases | ||
declare let describe: any; | ||
declare const after: any; | ||
declare const before: any; | ||
declare const it: any; | ||
|
||
|
||
describe('ExtensionConfigWrapper', () => { | ||
|
||
it('should load original config multiple times with the same result', async () => { | ||
const get = async () => JSON.parse(JSON.stringify((await ExtensionConfigWrapper.original()).toJSON({ | ||
attachState: true, | ||
attachVolatile: true, | ||
skipTags: {secret: true} as TAGS | ||
}))); | ||
const a = await get(); | ||
const b = await get(); | ||
expect(b).to.deep.equal(a); | ||
const c = await get(); | ||
expect(c).to.deep.equal(a); | ||
}); | ||
}); |