Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Description String of failing test are incorrect. #578

Closed
CorbynS opened this Issue Apr 21, 2014 · 2 comments

Comments

Projects
None yet
3 participants

CorbynS commented Apr 21, 2014

When running my test via karma runner, I get the following output for a failed test description:

Firefox 28.0.0 (Ubuntu) [object Object] [object Object] [object Object]
[object Object] [object Object] [object Object] [object Object] [object Object]
[object Object] [object Object] [object Object] [object Object] [object Object]
[object Object] [object Object] [object Object] [object Object] [object Object]
[object Object] [object Object] [object Object] [object Object] [object Object]
[object Object] [object Object] [object Object] [object Object] [object Object]
[object Object] [object Object] [object Object] [object Object] [object Object]
[object Object] [object Object] should wipe out empty names on close FAILED

According to my hierarchy of describes in my jasmine test, the description of the test should be:

dispPermListsCtrl close test should wipe out empty names on close FAILED

I have so far noticed this on all other failing test as well.

I am running Jasmine 2.0.0 on Karma Version 10.2, npm 1.4.3, node 0.10.26.

Here is a spit out of the jasmine test of interest:

describe("dispPermListsCtrl", function() {
  var scope;
  var list = [];
  var title = "TEST TILE";
  var roleName = "Role";
  beforeEach(module('adminPortal'));
  beforeEach(inject(function($rootScope, $controller) {
    scope = $rootScope.$new();

    controller = $controller("dispPermListsCtrl", {
      $scope : scope,
      $modalInstance : modalInstanceMock,
      list : list,
      title : title,
      roleName : roleName
    });
  }));
  describe("close test", function() {
    beforeEach(function() {
      spyOn(modalInstanceMock, 'close');
    });

    it("should wipe out empty names on close", function() {
      scope.list.push({itemInfo :{}, create:false, read:false, update:false, delete:false});
      scope.close();
      expect(modalInstanceMock.close).toHaveBeenCalledWith([]);
    });

    it("should call modalInstance close", function() {
      scope.close();
      expect(modalInstanceMock.close).toHaveBeenCalledWith(list);
    });
  });
});
Contributor

infews commented Jun 23, 2014

Have you tried running this same suite without Karma? I wonder if this is a Karma adapter problem and not with Jasmine core.

Owner

slackersoft commented Aug 18, 2014

It looks like this is actually an issue with the karma runner and not with jasmine itself. Closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment