test: fix several Bazel compiler tests in windows (#30146)
``` //packages/compiler-cli/test:ngc //packages/compiler/test:test ``` This also address `node_modules` to the ignored paths for ngc compiler as otherwise the `ready` is never fired Partially addresses #29785 PR Close #30146
This commit is contained in:
parent
7569a2e0d9
commit
31df5139c5
|
@ -20,7 +20,7 @@ steps:
|
||||||
# Add Bazel CI config
|
# Add Bazel CI config
|
||||||
- copy .codefresh\bazel.rc %ProgramData%\bazel.bazelrc
|
- copy .codefresh\bazel.rc %ProgramData%\bazel.bazelrc
|
||||||
# Run tests
|
# Run tests
|
||||||
- yarn bazel test //tools/ts-api-guardian:all //packages/language-service/test
|
- yarn bazel test //tools/ts-api-guardian:all //packages/language-service/test //packages/compiler/test //packages/compiler-cli/test:ngc
|
||||||
- yarn test-ivy-aot //packages/animations/test //packages/common/test //packages/forms/test //packages/http/test //packages/platform-browser/test //packages/platform-browser-dynamic/test //packages/router/test
|
- yarn test-ivy-aot //packages/animations/test //packages/common/test //packages/forms/test //packages/http/test //packages/platform-browser/test //packages/platform-browser-dynamic/test //packages/router/test
|
||||||
- yarn bazel test //tools/public_api_guard/...
|
- yarn bazel test //tools/public_api_guard/...
|
||||||
- yarn bazel test //packages/compiler-cli/integrationtest:integrationtest //packages/compiler-cli/test/compliance:compliance
|
- yarn bazel test //packages/compiler-cli/integrationtest:integrationtest //packages/compiler-cli/test/compliance:compliance
|
||||||
|
|
|
@ -70,7 +70,7 @@ export function createPerformWatchHost(
|
||||||
const watcher = chokidar.watch(options.basePath, {
|
const watcher = chokidar.watch(options.basePath, {
|
||||||
// ignore .dotfiles, .js and .map files.
|
// ignore .dotfiles, .js and .map files.
|
||||||
// can't ignore other files as we e.g. want to recompile if an `.html` file changes as well.
|
// can't ignore other files as we e.g. want to recompile if an `.html` file changes as well.
|
||||||
ignored: /((^[\/\\])\..)|(\.js$)|(\.map$)|(\.metadata\.json)/,
|
ignored: /((^[\/\\])\..)|(\.js$)|(\.map$)|(\.metadata\.json|node_modules)/,
|
||||||
ignoreInitial: true,
|
ignoreInitial: true,
|
||||||
persistent: true,
|
persistent: true,
|
||||||
});
|
});
|
||||||
|
|
|
@ -2028,11 +2028,13 @@ describe('ngc transformer command-line', () => {
|
||||||
const exitCode =
|
const exitCode =
|
||||||
main(['-p', path.join(basePath, 'src/tsconfig.json')], message => messages.push(message));
|
main(['-p', path.join(basePath, 'src/tsconfig.json')], message => messages.push(message));
|
||||||
expect(exitCode).toBe(1, 'Compile was expected to fail');
|
expect(exitCode).toBe(1, 'Compile was expected to fail');
|
||||||
|
const srcPathWithSep = `lib${path.sep}`;
|
||||||
expect(messages[0])
|
expect(messages[0])
|
||||||
.toEqual(`lib/test.component.ts(6,21): Error during template compile of 'TestComponent'
|
.toEqual(
|
||||||
|
`${srcPathWithSep}test.component.ts(6,21): Error during template compile of 'TestComponent'
|
||||||
Tagged template expressions are not supported in metadata in 't1'
|
Tagged template expressions are not supported in metadata in 't1'
|
||||||
't1' references 't2' at lib/indirect1.ts(3,27)
|
't1' references 't2' at ${srcPathWithSep}indirect1.ts(3,27)
|
||||||
't2' contains the error at lib/indirect2.ts(4,27).
|
't2' contains the error at ${srcPathWithSep}indirect2.ts(4,27).
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,7 +19,7 @@ export function makeTempDir(): string {
|
||||||
let dir: string;
|
let dir: string;
|
||||||
while (true) {
|
while (true) {
|
||||||
const id = (Math.random() * 1000000).toFixed(0);
|
const id = (Math.random() * 1000000).toFixed(0);
|
||||||
dir = path.join(tmpdir, `tmp.${id}`);
|
dir = path.posix.join(tmpdir, `tmp.${id}`);
|
||||||
if (!fs.existsSync(dir)) break;
|
if (!fs.existsSync(dir)) break;
|
||||||
}
|
}
|
||||||
fs.mkdirSync(dir);
|
fs.mkdirSync(dir);
|
||||||
|
|
Loading…
Reference in New Issue