1

I am learning angular testing and write simple testing code and it shows me error in it. In my app folder, I had created a test.spect.ts file that contains the following code.

describe('app',()=>{
    it('should display original title', () => {
    expect(true).toBe(true);
  });
});

using ng test I am trying to run the code and here comes the error.

is not digitally about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ ng test
+ ~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

Please help I am just on learning phase.

James
  • 1,335
  • 1
  • 10
  • 19
JParmar
  • 59
  • 8
  • 1
    Did you follow the link? Seems to be a windows issue. – Phix Feb 24 '21 at 18:51
  • 1
    I guess you are trying to run `ng test` from PowerShell. If so, you need to enable custom security policy: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser .You can check for more details here: https://stackoverflow.com/questions/58032631/why-powershell-does-not-run-angular-commands You can also try to run ng test from CMD to see if it works. – daliborp Feb 24 '21 at 20:18

0 Answers0