mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-08-17 07:00:22 +03:00
Fix behavior of new ScopeResolver
config caching in specs
This commit is contained in:
parent
32ff14f732
commit
09db9e060b
@ -104,6 +104,10 @@ describe('ScopeResolver', () => {
|
||||
atom.config.set('core.useExperimentalModernTreeSitter', true);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
ScopeResolver.clearConfigCache();
|
||||
});
|
||||
|
||||
it('resolves all scopes in absence of any tests or adjustments', async () => {
|
||||
await grammar.setQueryForTest('highlightsQuery', `
|
||||
(comment) @comment
|
||||
|
@ -124,6 +124,10 @@ ConfigCache.forConfig = (config) => {
|
||||
return configCache;
|
||||
};
|
||||
|
||||
ConfigCache.clear = () => {
|
||||
ConfigCache.CACHES_FOR_CONFIG_OBJECTS.clear();
|
||||
};
|
||||
|
||||
|
||||
// A data structure for storing scope information while processing capture
|
||||
// data. The data is reset in between each task.
|
||||
@ -954,5 +958,9 @@ ScopeResolver.ADJUSTMENTS = {
|
||||
}
|
||||
};
|
||||
|
||||
ScopeResolver.clearConfigCache = () => {
|
||||
ConfigCache.clear();
|
||||
};
|
||||
|
||||
|
||||
module.exports = ScopeResolver;
|
||||
|
Loading…
Reference in New Issue
Block a user