Skip to content

feat(@angular/cli): Add option to preserve symlinks for module resolution in test task #7666

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions packages/@angular/cli/commands/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface TestOptions {
poll?: number;
environment?: string;
app?: string;
preserveSymlinks?: boolean;
}


Expand Down Expand Up @@ -114,6 +115,12 @@ const TestCommand = Command.extend({
type: String,
aliases: ['a'],
description: 'Specifies app name to use.'
},
{
name: 'preserve-symlinks',
type: Boolean,
description: 'Do not use the real path when resolving modules.',
default: false
}
],

Expand Down
3 changes: 2 additions & 1 deletion packages/@angular/cli/tasks/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export default Task.extend({
progress: options.progress,
poll: options.poll,
environment: options.environment,
app: options.app
app: options.app,
preserveSymlinks: options.preserveSymlinks
};

// Assign additional karmaConfig options to the local ngapp config
Expand Down