Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'base' and 'absolute' being replaced in reporter output #1706

Open
nicholascelestin opened this issue Nov 12, 2015 · 9 comments
Open

'base' and 'absolute' being replaced in reporter output #1706

nicholascelestin opened this issue Nov 12, 2015 · 9 comments

Comments

@nicholascelestin
Copy link

Despite the commit in v0.13.11 (b3798df) addressing this, this issue still persists in v0.13.15 .

@dignifiedquire
Copy link
Member

Could you provide a repro please?

@mjgpy3
Copy link

mjgpy3 commented Nov 16, 2015

I'm seeing this too. I'm using karma-spec-reporter, running this test:

describe('words being replaced', function () {
  it('formats base and absolute unexpectedly in the expectation output only', function () {
    expect('base').toEqual('absolute');
  });
});

The output I'm getting is:

1) formats base and absolute unexpectedly in the expectation output only
      words being replaced
      Expected '/home/michael/proj' to equal ''
     At /home/michael/proj/spec/specExample.js:7

Perhaps https://github.com/karma-runner/karma/blob/master/lib/reporter.js#L25 needs to be more restrictive?

@crmckenzie
Copy link

More Info:
Suppose I have an expectation written as such:

var result = subject.requestAsJson();
expect(result).toEqual('{ "databaseType": "fredbob" }');

I get output in the console that looks like this:

Expected '{"dataC:/Users/Me/src/ProjectType":"fredbob" }' 
to equal '{ dataC:/Users/Me/src/ProjectType": "foobar" }'.

I'm using jasmine in the context of gulp -> karma -> require -> jasmine.

Here is someone's repro on StackOverflow

@liveakshay
Copy link

This problem still exists guys! Is there a plan and timeline to get a fix out? Hinders testing with firebase!

@AlaricCalmette
Copy link

👍

@ValentinH
Copy link

Got this today, it's quite funny but should be fix! 😄

@nikolaipetkov
Copy link

Just experienced it too. The problem is the same as mentioned above :)

@vvroman
Copy link

vvroman commented May 6, 2021

It seems like URL_REGEXP from https://github.com/karma-runner/karma/blob/master/lib/reporter.js#L22
matches strings like foo absolute bar

@markus-codewrangler
Copy link

still alive and kicking 😢

LOG: 'https://api.example.com/base/path/foo'
Chrome Headless 120.0.6099.216 (Mac OS 10.15.7) [...] FAILED
	Expected 'https://api.example.compath/foo' to be 'https://api.example.compath'.

Spec

console.log(fetch.calls.mostRecent().args[0]);

expect(fetch.calls.mostRecent().args[0]).toBe(
  'https://api.example.com/base/path'
);

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

No branches or pull requests

10 participants