Skip to content

Commit 64ad967

Browse files
author
Gregg Van Hove
committed
Rename some more stuff away from master
1 parent 2f7e5d0 commit 64ad967

File tree

7 files changed

+27
-27
lines changed

7 files changed

+27
-27
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/jasmine/jasmine-npm.png?branch=master)](https://travis-ci.org/jasmine/jasmine-npm)
1+
[![Build Status](https://travis-ci.org/jasmine/jasmine-npm.png?branch=main)](https://travis-ci.org/jasmine/jasmine-npm)
22
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjasmine%2Fjasmine-npm.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjasmine%2Fjasmine-npm?ref=badge_shield)
33

44
# The Jasmine Module

lib/command.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ function runJasmine(jasmine, env, print) {
135135
loadConfig(jasmine, env, print);
136136
jasmine.execute(env.files, env.filter);
137137
} else {
138-
var runMasterJasmine = require('./master');
139-
runMasterJasmine(jasmine, env, print, loadConfig);
138+
var runManagerJasmine = require('./manager');
139+
runManagerJasmine(jasmine, env, print, loadConfig);
140140
}
141141
}
142142

lib/master.js lib/manager.js

File renamed without changes.

lib/reporters/console_reporter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,14 @@ function ConsoleReporter() {
202202
printNewline();
203203
print(indent(stackFilter(failedExpectation.stack), 4));
204204
}
205-
205+
206206
// When failSpecWithNoExpectations = true and a spec fails because of no expectations found,
207207
// jasmine-core reports it as a failure with no message.
208208
//
209209
// Therefore we assume that when there are no failed or passed expectations,
210210
// the failure was because of our failSpecWithNoExpectations setting.
211211
//
212-
// Same logic is used by jasmine.HtmlReporter, see https://github.com/jasmine/jasmine/blob/master/src/html/HtmlReporter.js
212+
// Same logic is used by jasmine.HtmlReporter, see https://github.com/jasmine/jasmine/blob/main/src/html/HtmlReporter.js
213213
if (result.failedExpectations.length === 0 &&
214214
result.passedExpectations.length === 0) {
215215
printNewline();

spec/jasmine_spec.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,27 @@ describe('Jasmine', function() {
5252
it('add spec files with glob pattern', function() {
5353
expect(this.testJasmine.specFiles).toEqual([]);
5454
this.testJasmine.addSpecFiles(['spec/*.js']);
55-
expect(this.testJasmine.specFiles.map(basename)).toEqual(['command_spec.js', 'jasmine_spec.js', 'load_config_spec.js', 'master_spec.js', 'worker_spec.js']);
55+
expect(this.testJasmine.specFiles.map(basename)).toEqual(['command_spec.js', 'jasmine_spec.js', 'load_config_spec.js', 'manager_spec.js', 'worker_spec.js']);
5656
});
5757

5858
it('add spec files with excluded files', function() {
5959
expect(this.testJasmine.specFiles).toEqual([]);
6060
this.testJasmine.addSpecFiles(['spec/*.js', '!spec/command*']);
61-
expect(this.testJasmine.specFiles.map(basename)).toEqual(['jasmine_spec.js', 'load_config_spec.js', 'master_spec.js', 'worker_spec.js']);
61+
expect(this.testJasmine.specFiles.map(basename)).toEqual(['jasmine_spec.js', 'load_config_spec.js', 'manager_spec.js', 'worker_spec.js']);
6262
});
6363

6464
it('add spec files with glob pattern to existings files', function() {
6565
var aFile = path.join(this.testJasmine.projectBaseDir, this.testJasmine.specDir, 'spec/command_spec.js');
6666
this.testJasmine.specFiles = [aFile, 'b'];
6767
this.testJasmine.addSpecFiles(['spec/*.js']);
68-
expect(this.testJasmine.specFiles.map(basename)).toEqual(['command_spec.js', 'b', 'jasmine_spec.js', 'load_config_spec.js', 'master_spec.js', 'worker_spec.js']);
68+
expect(this.testJasmine.specFiles.map(basename)).toEqual(['command_spec.js', 'b', 'jasmine_spec.js', 'load_config_spec.js', 'manager_spec.js', 'worker_spec.js']);
6969
});
7070

7171
it('add helper files with glob pattern to existings files', function() {
7272
var aFile = path.join(this.testJasmine.projectBaseDir, this.testJasmine.specDir, 'spec/command_spec.js');
7373
this.testJasmine.helperFiles = [aFile, 'b'];
7474
this.testJasmine.addHelperFiles(['spec/*.js']);
75-
expect(this.testJasmine.helperFiles.map(basename)).toEqual(['command_spec.js', 'b', 'jasmine_spec.js', 'load_config_spec.js', 'master_spec.js', 'worker_spec.js']);
75+
expect(this.testJasmine.helperFiles.map(basename)).toEqual(['command_spec.js', 'b', 'jasmine_spec.js', 'load_config_spec.js', 'manager_spec.js', 'worker_spec.js']);
7676
});
7777
});
7878

spec/master_spec.js spec/manager_spec.js

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
var cluster = require("cluster"),
2-
runMasterJasmine = require("../lib/master"),
2+
runManagerJasmine = require("../lib/manager"),
33
noop = function(){};
44

5-
describe("master", function() {
5+
describe("manager", function() {
66
beforeEach(function() {
77
this.fakeRunJasmine = jasmine.createSpy("fakeRunJasmine");
88

@@ -16,19 +16,19 @@ describe("master", function() {
1616
var fakeJasmine = jasmine.createSpyObj('jasmine', ["execute", "configureDefaultReporter", "addSpecFiles"]);
1717

1818
fakeJasmine.specFiles = [
19-
"./master_spec.js",
19+
"./manager_spec.js",
2020
"./worker_spec.js"
2121
];
2222
fakeJasmine.reporter = jasmine.createSpyObj('reporter', ['jasmineDone']);
2323
var fakeSend = jasmine.createSpy("fakeSend"),
2424
fakeKill = jasmine.createSpy("fakeKill"),
25-
env = {
25+
env = {
2626
workerCount: 1,
2727
files: []
2828
},
2929
allArgs = null;
3030
cluster.removeAllListeners("message");
31-
runMasterJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
31+
runManagerJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
3232

3333
cluster.emit("message", { send: fakeSend, kill: fakeKill }, { kind: "jasmineDone" });
3434
expect(fakeJasmine.reporter.jasmineDone).not.toHaveBeenCalled();
@@ -55,7 +55,7 @@ describe("master", function() {
5555

5656
fakeJasmine.specFiles = [];
5757
fakeJasmine.reporter = jasmine.createSpyObj('reporter', ['specStarted']);
58-
runMasterJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
58+
runManagerJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
5959

6060
var result = "jasmine";
6161
cluster.emit("message", { send: noop, kill: noop }, { kind: "specStarted", result: result });
@@ -68,7 +68,7 @@ describe("master", function() {
6868

6969
fakeJasmine.specFiles = [];
7070
fakeJasmine.reporter = jasmine.createSpyObj('reporter', ['specDone']);
71-
runMasterJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
71+
runManagerJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
7272

7373
var result = "jasmine";
7474
cluster.emit("message", { send: noop, kill: noop }, { kind: "specDone", result: result });
@@ -81,7 +81,7 @@ describe("master", function() {
8181

8282
fakeJasmine.specFiles = [];
8383
fakeJasmine.reporter = jasmine.createSpyObj('reporter', ['suiteStarted']);
84-
runMasterJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
84+
runManagerJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
8585

8686
var result = "jasmine";
8787
cluster.emit("message", { send: noop, kill: noop }, { kind: "suiteStarted", result: result });
@@ -94,7 +94,7 @@ describe("master", function() {
9494

9595
fakeJasmine.specFiles = [];
9696
fakeJasmine.reporter = jasmine.createSpyObj('reporter', ['suiteDone']);
97-
runMasterJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
97+
runManagerJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
9898

9999
var result = "jasmine";
100100
cluster.emit("message", { send: noop, kill: noop }, { kind: "suiteDone", result: result });
@@ -107,7 +107,7 @@ describe("master", function() {
107107

108108
fakeJasmine.specFiles = [];
109109
fakeJasmine.reporter = jasmine.createSpyObj('reporter', ['jasmineStarted']);
110-
runMasterJasmine(fakeJasmine, {}, noop, this.fakeRunJasmine);
110+
runManagerJasmine(fakeJasmine, {}, noop, this.fakeRunJasmine);
111111

112112
cluster.emit("message", { send: noop, kill: noop }, { kind: "jasmineStarted", result: result });
113113
expect(fakeJasmine.reporter.jasmineStarted.toString()).toBe(noop.toString());
@@ -119,11 +119,11 @@ describe("master", function() {
119119

120120
it("'jasmineDone' should not be forwarded", function() {
121121
var fakeJasmine = jasmine.createSpyObj('jasmine', ["execute", "configureDefaultReporter", "addSpecFiles"]);
122-
122+
123123
fakeJasmine.specFiles = [];
124124
fakeJasmine.reporter = jasmine.createSpyObj('reporter', ['jasmineDone']);
125-
runMasterJasmine(fakeJasmine, {}, noop, this.fakeRunJasmine);
126-
125+
runManagerJasmine(fakeJasmine, {}, noop, this.fakeRunJasmine);
126+
127127
cluster.emit("message", { send: noop, kill: noop }, { kind: "jasmineDone", result: 1 });
128128
expect(fakeJasmine.reporter.jasmineDone).not.toHaveBeenCalled();
129129

@@ -137,13 +137,13 @@ describe("master", function() {
137137

138138
it("should configure the env, jasmine and fork correctly", function() {
139139
var fakeJasmine = jasmine.createSpyObj('jasmine', ["execute", "configureDefaultReporter", "addSpecFiles"]),
140-
env = {
140+
env = {
141141
workerCount: 2,
142142
files: [],
143143
};
144-
144+
145145
fakeJasmine.specFiles = [];
146-
runMasterJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
146+
runManagerJasmine(fakeJasmine, env, noop, this.fakeRunJasmine);
147147

148148
expect(this.fakeRunJasmine).toHaveBeenCalled();
149149
expect(fakeJasmine.configureDefaultReporter).toHaveBeenCalled();
@@ -161,4 +161,4 @@ describe("master", function() {
161161
expect(allArgs[1][0].reporter).toBe("./reporters/worker_reporter.js");
162162
expect(allArgs[1][0].files[0]).toBe(fakeJasmine.specFiles[1]);
163163
});
164-
});
164+
});

spec/support/jasmine.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"spec_files": [
44
"command_spec.js",
55
"jasmine_spec.js",
6-
"master_spec.js",
6+
"manager_spec.js",
77
"new_spec.js",
88
"run_spec.js",
99
"worker_spec.js",

0 commit comments

Comments
 (0)