Skip to content

Commit

Permalink
Also update tests for addHelperFiles() removal
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaswerkmeister committed Jun 14, 2022
1 parent 234f981 commit c5a7eeb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/command_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('command', function() {

this.command = new Command(projectBaseDir, examplesDir, this.out.print);

this.fakeJasmine = jasmine.createSpyObj('jasmine', ['loadConfigFile', 'addHelperFiles', 'addRequires', 'showColors', 'execute',
this.fakeJasmine = jasmine.createSpyObj('jasmine', ['loadConfigFile', 'addMatchingHelperFiles', 'addRequires', 'showColors', 'execute',
'randomizeTests', 'seed', 'coreVersion', 'clearReporters', 'addReporter']);
this.fakeJasmine.loader = new Loader();
this.fakeJasmine.env = jasmine.createSpyObj('env', ['configure']);
Expand Down Expand Up @@ -243,17 +243,17 @@ describe('command', function() {

it('should be able to add one helper pattern', async function() {
await this.command.run(this.fakeJasmine, ['--helper=helpers/**/*.js']);
expect(this.fakeJasmine.addHelperFiles).toHaveBeenCalledWith(['helpers/**/*.js']);
expect(this.fakeJasmine.addMatchingHelperFiles).toHaveBeenCalledWith(['helpers/**/*.js']);
});

it('should be able to add many helper patterns', async function() {
await this.command.run(this.fakeJasmine, ['--helper=helpers/**/*.js', '--helper=other.js']);
expect(this.fakeJasmine.addHelperFiles).toHaveBeenCalledWith(['helpers/**/*.js', 'other.js']);
expect(this.fakeJasmine.addMatchingHelperFiles).toHaveBeenCalledWith(['helpers/**/*.js', 'other.js']);
});

it('should not modify helper patterns if no argument given', async function() {
await this.command.run(this.fakeJasmine, []);
expect(this.fakeJasmine.addHelperFiles).not.toHaveBeenCalled();
expect(this.fakeJasmine.addMatchingHelperFiles).not.toHaveBeenCalled();
});

it('should be able to add one require', async function() {
Expand Down

0 comments on commit c5a7eeb

Please sign in to comment.