Move private APIs to private namespace

Fixes #2078
This commit is contained in:
Steve Gravrock
2025-09-27 13:21:09 -07:00
parent fbec066837
commit 168ff0a751
183 changed files with 2627 additions and 2459 deletions

View File

@@ -1,6 +1,6 @@
describe('JsApiReporter', function() {
it('knows when a full environment is started', function() {
const reporter = new jasmineUnderTest.JsApiReporter({});
const reporter = new privateUnderTest.JsApiReporter({});
expect(reporter.started).toBe(false);
expect(reporter.finished).toBe(false);
@@ -12,7 +12,7 @@ describe('JsApiReporter', function() {
});
it('knows when a full environment is done', function() {
const reporter = new jasmineUnderTest.JsApiReporter({});
const reporter = new privateUnderTest.JsApiReporter({});
expect(reporter.started).toBe(false);
expect(reporter.finished).toBe(false);
@@ -24,13 +24,13 @@ describe('JsApiReporter', function() {
});
it("defaults to 'loaded' status", function() {
const reporter = new jasmineUnderTest.JsApiReporter({});
const reporter = new privateUnderTest.JsApiReporter({});
expect(reporter.status()).toEqual('loaded');
});
it("reports 'started' when Jasmine has started", function() {
const reporter = new jasmineUnderTest.JsApiReporter({});
const reporter = new privateUnderTest.JsApiReporter({});
reporter.jasmineStarted();
@@ -38,7 +38,7 @@ describe('JsApiReporter', function() {
});
it("reports 'done' when Jasmine is done", function() {
const reporter = new jasmineUnderTest.JsApiReporter({});
const reporter = new privateUnderTest.JsApiReporter({});
reporter.jasmineDone({});
@@ -46,7 +46,7 @@ describe('JsApiReporter', function() {
});
it('tracks a suite', function() {
const reporter = new jasmineUnderTest.JsApiReporter({});
const reporter = new privateUnderTest.JsApiReporter({});
reporter.suiteStarted({
id: 123,
@@ -71,7 +71,7 @@ describe('JsApiReporter', function() {
describe('#specResults', function() {
let reporter, specResult1, specResult2;
beforeEach(function() {
reporter = new jasmineUnderTest.JsApiReporter({});
reporter = new privateUnderTest.JsApiReporter({});
specResult1 = {
id: 1,
description: 'A spec'
@@ -101,7 +101,7 @@ describe('JsApiReporter', function() {
describe('#suiteResults', function() {
let reporter, suiteStarted1, suiteResult1, suiteResult2;
beforeEach(function() {
reporter = new jasmineUnderTest.JsApiReporter({});
reporter = new privateUnderTest.JsApiReporter({});
suiteStarted1 = {
id: 1
};
@@ -138,7 +138,7 @@ describe('JsApiReporter', function() {
describe('#executionTime', function() {
it('should start the timer when jasmine starts', function() {
const timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
reporter = new jasmineUnderTest.JsApiReporter({
reporter = new privateUnderTest.JsApiReporter({
timer: timerSpy
});
@@ -148,7 +148,7 @@ describe('JsApiReporter', function() {
it('should return the time it took the specs to run, in ms', function() {
const timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
reporter = new jasmineUnderTest.JsApiReporter({
reporter = new privateUnderTest.JsApiReporter({
timer: timerSpy
});
@@ -160,7 +160,7 @@ describe('JsApiReporter', function() {
describe("when the specs haven't finished being run", function() {
it('should return undefined', function() {
const timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
reporter = new jasmineUnderTest.JsApiReporter({
reporter = new privateUnderTest.JsApiReporter({
timer: timerSpy
});
@@ -171,7 +171,7 @@ describe('JsApiReporter', function() {
describe('#runDetails', function() {
it('should have details about the run', function() {
const reporter = new jasmineUnderTest.JsApiReporter({});
const reporter = new privateUnderTest.JsApiReporter({});
reporter.jasmineDone({ some: { run: 'details' } });
expect(reporter.runDetails).toEqual({ some: { run: 'details' } });
});