Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comparison tests under WSL #1109

Merged
merged 11 commits into from May 27, 2020
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,8 @@
# Changelog

## v7.0.5
* [Add a delay before starting the comparison tests to avoid failures under WSL](https://github.com/TypeStrong/ts-loader/pull/1109) - thanks @appzuka

## v7.0.4
* [Ensure a separate webpack instance is created for different loader options](https://github.com/TypeStrong/ts-loader/pull/1104) - thanks @appzuka

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ts-loader",
"version": "7.0.4",
"version": "7.0.5",
"description": "TypeScript loader for webpack",
"main": "index.js",
"types": "dist",
Expand Down
13 changes: 9 additions & 4 deletions test/comparison-tests/create-and-execute-test.js
Expand Up @@ -109,10 +109,15 @@ function createTest(test, testPath, options) {
mkdirp.sync(paths.actualOutput);
mkdirp.sync(paths.webpackOutput);

// execute webpack
testState.watcher = webpack(
createWebpackConfig(paths, options, nonWatchNonCompositePath !== testPath)
).watch({ aggregateTimeout: 1500 }, createWebpackWatchHandler(done, paths, testState, options, test));

// Need to wait > FS_ACCURACY as defined in watchpack.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a link to the details in watchpack that discuss this? Would be super useful for anyone else taking a look at this.

setTimeout(() => {
// execute webpack
testState.watcher = webpack(
createWebpackConfig(paths, options, nonWatchNonCompositePath !== testPath)
).watch({ aggregateTimeout: 1500 }, createWebpackWatchHandler(done, paths, testState, options, test));
}, 200);

};
}

Expand Down