mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* fix(NA): @kbn/utils build on windows native environment * chore(NA): remove circular dep from @kbn/utils
This commit is contained in:
parent
d40fb7621e
commit
68285a8960
1 changed files with 9 additions and 2 deletions
|
@ -7,10 +7,17 @@
|
|||
*/
|
||||
|
||||
import { accessSync, constants } from 'fs';
|
||||
import { createAbsolutePathSerializer } from '@kbn/dev-utils';
|
||||
import { getConfigPath, getDataPath, getLogsPath, getConfigDirectory } from './';
|
||||
import { REPO_ROOT } from '../repo_root';
|
||||
|
||||
expect.addSnapshotSerializer(createAbsolutePathSerializer());
|
||||
expect.addSnapshotSerializer(
|
||||
((rootPath: string = REPO_ROOT, replacement = '<absolute path>') => {
|
||||
return {
|
||||
test: (value: any) => typeof value === 'string' && value.startsWith(rootPath),
|
||||
serialize: (value: string) => value.replace(rootPath, replacement).replace(/\\/g, '/'),
|
||||
};
|
||||
})()
|
||||
);
|
||||
|
||||
describe('Default path finder', () => {
|
||||
it('should expose a path to the config directory', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue