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

Change addHelperFiles() call to addMatchingHelperFiles() #198

Merged
merged 2 commits into from
Jun 16, 2022

Conversation

lucaswerkmeister
Copy link
Contributor

addHelperFiles() was removed in 28f9495. Fixes #197.

@lucaswerkmeister
Copy link
Contributor Author

Not sure why CI is failing, it seemed to work locally.

@sgravrock
Copy link
Member

Thanks for the PR.

I'm not sure why the tests pass for you. I get the same errors locally as on CI:

% npm test

> jasmine@4.2.0 test
> node ./bin/jasmine.js

Randomized with seed 59312
Started
..............................................................................................................................................................F...F.............................

Failures:
1) command running specs should be able to add one helper pattern
  Message:
    TypeError: jasmine.addMatchingHelperFiles is not a function
  Stack:
        at runJasmine (/Users/steve/src/jasmine/jasmine-npm/lib/command.js:143:13)
        at async Command.run (/Users/steve/src/jasmine/jasmine-npm/lib/command.js:56:9)
        at async UserContext.<anonymous> (/Users/steve/src/jasmine/jasmine-npm/spec/command_spec.js:245:7)

2) command running specs should be able to add many helper patterns
  Message:
    TypeError: jasmine.addMatchingHelperFiles is not a function
  Stack:
        at runJasmine (/Users/steve/src/jasmine/jasmine-npm/lib/command.js:143:13)
        at async Command.run (/Users/steve/src/jasmine/jasmine-npm/lib/command.js:56:9)
        at async UserContext.<anonymous> (/Users/steve/src/jasmine/jasmine-npm/spec/command_spec.js:250:7)

192 specs, 2 failures
Finished in 1.382 seconds
Randomized with seed 59312 (jasmine --random=true --seed=59312)

The issue is that the fakeJasmine defined in command_spec.js has an addHelperFiles method rather than the addMatchingHelperFiles defined by the real thing.

@lucaswerkmeister
Copy link
Contributor Author

Sorry, I meant that I edited the file in node_modules/ and then the real CLI seemed to work – I didn’t realize the unit tests have a mocked method. I’ll look into updating the tests as well.

@sgravrock sgravrock merged commit fbaf707 into jasmine:main Jun 16, 2022
@lucaswerkmeister lucaswerkmeister deleted the patch-1 branch June 17, 2022 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jasmine --helper flag broken following addHelperFiles() removal
2 participants