-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat-fix(pointer-analysis): expand configuration to enforce disable
- Loading branch information
1 parent
6249f30
commit 0ca7566
Showing
6 changed files
with
97 additions
and
54 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { FlowrConfigOptions } from '../../../src/config'; | ||
import { setConfig , getConfig } from '../../../src/config'; | ||
import { afterAll, beforeAll } from 'vitest'; | ||
import type { DeepPartial } from 'ts-essentials'; | ||
import { deepMergeObject } from '../../../src/util/objects'; | ||
|
||
|
||
/** | ||
* Temporarily sets the config to the given value for all tests in the suite. | ||
*/ | ||
export function useConfigForTest(config: DeepPartial<FlowrConfigOptions>): void { | ||
const currentConfig = getConfig(); | ||
beforeAll(() => { | ||
setConfig(deepMergeObject(currentConfig, config) as FlowrConfigOptions); | ||
}); | ||
afterAll(() => { | ||
setConfig(currentConfig); | ||
}); | ||
} |
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