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 API tests on windows and add missing await on ts test #7655

Merged
merged 2 commits into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions dev-packages/application-manager/src/expose-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ export = function (this: webpack.loader.LoaderContext, source: string, sourceMap
this.cacheable();
}

let modulePackage = modulePackages.find(({ dir }) => this.resourcePath.startsWith(dir + '/'));
let modulePackage = modulePackages.find(({ dir }) => this.resourcePath.startsWith(dir + path.sep));
if (modulePackage) {
this.callback(undefined, exposeModule(modulePackage, this.resourcePath, source), sourceMap);
return;
}
const index = this.resourcePath.lastIndexOf('/node_modules');
const searchString = path.sep + 'node_modules';
const index = this.resourcePath.lastIndexOf(searchString);
if (index !== -1) {
const nodeModulesPath = this.resourcePath.substring(0, index + '/node_modules'.length);
const nodeModulesPath = this.resourcePath.substring(0, index + searchString.length);
let dir = this.resourcePath;
while ((dir = path.dirname(dir)) !== nodeModulesPath) {
try {
Expand Down
2 changes: 1 addition & 1 deletion examples/api-tests/src/typescript.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ module.exports = (port, host, argv) => Promise.resolve()
`
});
await pluginService.didStart;
Promise.all([typescriptPluginId, referencesPluginId].map(async pluginId => {
await Promise.all([typescriptPluginId, referencesPluginId].map(async pluginId => {
if (!pluginService.getPlugin(pluginId)) {
throw new Error(pluginId + ' should be started');
}
Expand Down