Jasmine.js comparing arrays
Is there a way in jasmine.js to check if two arrays are equal, for example: arr = [1, 2, 3] expect(arr).toBe([1, 2, 3]) … Read more
Is there a way in jasmine.js to check if two arrays are equal, for example: arr = [1, 2, 3] expect(arr).toBe([1, 2, 3]) … Read more
Is there a way to run ng test for a single file instead of for the entire test suite? Ideally, I’d like to … Read more
I have Angular2 project build with Angular-CLI (beta 20). Is there a way to run tests against only one selected spec file? I … Read more
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’; … Read more
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 … Read more
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 … Read more
How do you test a private function in angular 2 ? class FooBar { private _status: number; constructor( private foo : Bar ) … Read more
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 … Read more
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 … Read more