Is there a way in jasmine.js to check if two arrays are equal, for example: arr = [1, 2, 3] expect(arr).toBe(...
Is there a way to run ng test for a single file instead of for the entire test suite? Ideally, I’d like to ...
-
May 27, 2022
- 0 Comments
I have Angular2 project build with Angular-CLI (beta 20). Is there a way to run tests against only one selected spec file? I ...
-
May 26, 2022
- 0 Comments
I’m following this tutorial from angular.io As they said, I’ve created hero.spec.ts file to create unit tests: import { Hero } from './hero'; ...
-
May 26, 2022
- 0 Comments
I’m trying to figure out on how to test internal (i.e. not exported) functions in nodejs (preferably with mocha or jasmine). And i ...
-
May 26, 2022
- 0 Comments
What is the difference between expect(something).toBe(true), expect(something).toBeTruthy() and expect(something).toBeTrue()? Note that toBeTrue() is a custom matcher introduced in jasmine-matchers among other useful and ...
-
May 25, 2022
- 0 Comments
How do you test a private function in angular 2 ? class FooBar { private _status: number; constructor( private foo : Bar ) ...
-
May 19, 2022
- 0 Comments
Let’s say I have the following: var myNumber = 5; expect(myNumber).toBe(5); expect(myNumber).toEqual(5); Both of the above tests will pass. Is there a difference ...
-
May 7, 2022
- 0 Comments
I’m trying to write a test for the Jasmine Test Framework which expects an error. At the moment I’m using a Jasmine Node.js ...
-
May 1, 2022
- 0 Comments