Skip to content

Commit bd33f64

Browse files
alan-agius4Keen Yee Liau
authored and
Keen Yee Liau
committed
Enable Webpack E2Es (#12735)
* test: enable webpack e2e tests * refactor: remove redundant catch block * fix(@ngtools/webpack): when stats is not available call callback with an error Fixes #12686
1 parent 90a5a7d commit bd33f64

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

packages/ngtools/webpack/src/virtual_file_system_decorator.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ export class VirtualFileSystemDecorator implements InputFileSystem {
2626
}
2727

2828
stat(path: string, callback: (err: Error, stats: Stats) => void): void {
29-
try {
29+
const result = this._webpackCompilerHost.stat(path);
30+
if (result) {
3031
// tslint:disable-next-line:no-any
31-
callback(null as any, this._webpackCompilerHost.stat(path) as any);
32-
} catch (e) {
32+
callback(null as any, result);
33+
} else {
3334
// tslint:disable-next-line:no-any
34-
callback(e, undefined as any);
35+
callback(new FileDoesNotExistException(path), undefined as any);
3536
}
3637
}
3738

tests/legacy-cli/e2e_runner.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ const allTests = glob.sync(path.join(e2eRoot, testGlob), { nodir: true, ignore:
124124
.filter(name => !name.includes('tests/commands/new/'))
125125
// NEEDS devkit change
126126
.filter(name => !name.endsWith('/existing-directory.ts'))
127-
// ngtools/webpack is now in devkit and needs to be tested there
128-
.filter(name => !name.endsWith('/packages/webpack/server-ng5.ts'))
129-
.filter(name => !name.endsWith('/packages/webpack/test-ng5.ts'))
130-
.filter(name => !name.endsWith('/packages/webpack/weird-ng5.ts'))
131127
// Disabled on rc.0 due to needed sync with devkit for changes.
132128
.filter(name => !name.endsWith('/service-worker.ts'))
133129
.sort();

0 commit comments

Comments
 (0)