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

Escape Jasmine's --filter argument #20

Open
koteq opened this issue Jan 24, 2022 · 0 comments
Open

Escape Jasmine's --filter argument #20

koteq opened this issue Jan 24, 2022 · 0 comments
Labels
bug Something isn't working help needed Extra attention is needed

Comments

@koteq
Copy link

koteq commented Jan 24, 2022

Jasmine's --filter= CLI argument isn't properly escaped for Regex.

For example

describe("Utils", () => {
	  describe("myFunction()", () => {
		  it("works", () => {  // <-- I'm trying to run tests only for this block
			  expect(true).toBeTrue();
		  });
	  });

	// other utils
});

Produces this command, which doesn't correctly filter

node \
	~/p/node_modules/jasmine/bin/jasmine.js \
	"--reporter=intellij_reporter.js" \
	~/p/tests/utils.ts \
	--filter=Utils.myFunction().works

It looks like the filter argument is directly passed to Jasmin.execute() and it's expected to be a Regex string.

@koteq koteq changed the title Shell escape Jasmine's --filter argument Escape Jasmine's --filter argument Jan 24, 2022
@sgravrock sgravrock added the help needed Extra attention is needed label Mar 26, 2022
@sgravrock sgravrock added the bug Something isn't working label Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help needed Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants