Skip to content

Commit

Permalink
Update condition to avoid infinite recursion in Windows platform (#5161)
Browse files Browse the repository at this point in the history
* Update condition to avoid infinite recursion in Windows platform

* Update CHANGELOG.md

* Remove `skipOnWindows` since tests run fine on windows
  • Loading branch information
Justin-ZS authored and cpojer committed Dec 23, 2017
1 parent e879099 commit 5a37891
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ None for now

* `[jest-runtime]` fix error for test files providing coverage.
([#5117](https://github.com/facebook/jest/pull/5117))
* `[jest-config]` fix unexpected condition to avoid infinite recursion in Windows platform.([#5161](https://github.com/facebook/jest/pull/5161))

### Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ import os from 'os';
import path from 'path';
import resolveConfigPath from '../resolve_config_path';

import skipOnWindows from '../../../../scripts/skip_on_windows';

const {cleanup, writeFiles} = require('../../../../integration_tests/utils');

skipOnWindows.suite();

const DIR = path.resolve(os.tmpdir(), 'resolve_config_path_test');
const ERROR_PATTERN = /Could not find a config file based on provided values/;
const NO_ROOT_DIR_ERROR_PATTERN = /Can\'t find a root directory/;
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-config/src/resolve_config_path.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const resolveConfigPathByTraversing = (

// This is the system root.
// We tried everything, config is nowhere to be found ¯\_(ツ)_/¯
if (pathToResolve === path.sep) {
if (pathToResolve === path.dirname(pathToResolve)) {
throw new Error(makeResolutionErrorMessage(initialPath, cwd));
}

Expand Down

0 comments on commit 5a37891

Please sign in to comment.