Closed
Description
OS
Mac OSX - EL Capitan
Versions.
angular-cli: 1.0.0-beta.19-3
node: 6.4.0
os: darwin x64
Repro steps.
- Have a default angular-cli setup in place (by running "ng new <project_name>")
- Then there should be
AppComponent
and its spec file created by default. - Add a new method in
app.component.ts
:
public static returnAorB(character: 'A' | 'B') {
return character;
}
And add following line anywhere in app.component.spec.ts
:
expect(AppComponent.returnAorB('C')).toEqual('C');
- Run "ng test --watch=false"
It will generate an error complaining Argument of type '"C"' is not assignable to parameter of type '"A" | "B"'.
But the command did not exit.
The log given by the failure.
....
ERROR in [default] <path>/src/app/app.component.spec.ts:16:35
Argument of type '"C"' is not assignable to parameter of type '"A" | "B"'.
.....
(Completes and Exits with successful code)