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,7 +1,7 @@
describe('AsyncExpectation', function() {
beforeEach(function() {
jasmineUnderTest.Expectation.addAsyncCoreMatchers(
jasmineUnderTest.asyncMatchers
privateUnderTest.Expectation.addAsyncCoreMatchers(
privateUnderTest.asyncMatchers
);
});
@@ -9,9 +9,9 @@ describe('AsyncExpectation', function() {
it('converts a pass to a fail', function() {
const addExpectationResult = jasmine.createSpy('addExpectationResult'),
actual = Promise.resolve(),
pp = jasmineUnderTest.makePrettyPrinter(),
expectation = jasmineUnderTest.Expectation.asyncFactory({
matchersUtil: new jasmineUnderTest.MatchersUtil({ pp: pp }),
pp = privateUnderTest.makePrettyPrinter(),
expectation = privateUnderTest.Expectation.asyncFactory({
matchersUtil: new privateUnderTest.MatchersUtil({ pp: pp }),
actual: actual,
addExpectationResult: addExpectationResult
});
@@ -30,8 +30,8 @@ describe('AsyncExpectation', function() {
it('converts a fail to a pass', function() {
const addExpectationResult = jasmine.createSpy('addExpectationResult'),
actual = Promise.reject(new Error('nope')),
expectation = jasmineUnderTest.Expectation.asyncFactory({
matchersUtil: new jasmineUnderTest.MatchersUtil({
expectation = privateUnderTest.Expectation.asyncFactory({
matchersUtil: new privateUnderTest.MatchersUtil({
pp: function() {}
}),
actual: actual,
@@ -55,7 +55,7 @@ describe('AsyncExpectation', function() {
const addExpectationResult = jasmine.createSpy('addExpectationResult'),
actual = dummyPromise(),
expectation = jasmineUnderTest.Expectation.asyncFactory({
expectation = privateUnderTest.Expectation.asyncFactory({
actual: actual,
addExpectationResult: addExpectationResult
});
@@ -80,7 +80,7 @@ describe('AsyncExpectation', function() {
}
},
addExpectationResult = jasmine.createSpy('addExpectationResult'),
expectation = jasmineUnderTest.Expectation.asyncFactory({
expectation = privateUnderTest.Expectation.asyncFactory({
actual: Promise.reject('rejected'),
addExpectationResult: addExpectationResult,
matchersUtil: matchersUtil
@@ -105,10 +105,10 @@ describe('AsyncExpectation', function() {
buildFailureMessage: function() {
return 'failure message';
},
pp: jasmineUnderTest.makePrettyPrinter()
pp: privateUnderTest.makePrettyPrinter()
},
addExpectationResult = jasmine.createSpy('addExpectationResult'),
expectation = jasmineUnderTest.Expectation.asyncFactory({
expectation = privateUnderTest.Expectation.asyncFactory({
actual: Promise.reject('b'),
addExpectationResult: addExpectationResult,
matchersUtil: matchersUtil
@@ -140,7 +140,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const actual = Promise.reject(new Error('nope'));
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
actual: actual,
addExpectationResult: addExpectationResult,
matchersUtil: matchersUtil
@@ -161,11 +161,11 @@ describe('AsyncExpectation', function() {
it('works with #not', function() {
const addExpectationResult = jasmine.createSpy('addExpectationResult'),
actual = Promise.resolve(),
pp = jasmineUnderTest.makePrettyPrinter(),
expectation = jasmineUnderTest.Expectation.asyncFactory({
pp = privateUnderTest.makePrettyPrinter(),
expectation = privateUnderTest.Expectation.asyncFactory({
actual: actual,
addExpectationResult: addExpectationResult,
matchersUtil: new jasmineUnderTest.MatchersUtil({ pp: pp })
matchersUtil: new privateUnderTest.MatchersUtil({ pp: pp })
});
return expectation
@@ -185,11 +185,11 @@ describe('AsyncExpectation', function() {
it('works with #not and a custom message', function() {
const addExpectationResult = jasmine.createSpy('addExpectationResult'),
actual = Promise.resolve('a'),
expectation = jasmineUnderTest.Expectation.asyncFactory({
expectation = privateUnderTest.Expectation.asyncFactory({
actual: actual,
addExpectationResult: addExpectationResult,
matchersUtil: new jasmineUnderTest.MatchersUtil({
pp: jasmineUnderTest.makePrettyPrinter()
matchersUtil: new privateUnderTest.MatchersUtil({
pp: privateUnderTest.makePrettyPrinter()
})
});
@@ -214,7 +214,7 @@ describe('AsyncExpectation', function() {
toFoo: function() {},
toBar: function() {}
},
expectation = jasmineUnderTest.Expectation.asyncFactory({
expectation = privateUnderTest.Expectation.asyncFactory({
customAsyncMatchers: asyncMatchers
});
@@ -236,7 +236,7 @@ describe('AsyncExpectation', function() {
buildFailureMessage: jasmine.createSpy('buildFailureMessage')
},
addExpectationResult = jasmine.createSpy('addExpectationResult'),
expectation = jasmineUnderTest.Expectation.asyncFactory({
expectation = privateUnderTest.Expectation.asyncFactory({
matchersUtil: matchersUtil,
customAsyncMatchers: matchers,
actual: 'an actual',
@@ -263,7 +263,7 @@ describe('AsyncExpectation', function() {
buildFailureMessage: jasmine.createSpy('buildFailureMessage')
},
addExpectationResult = jasmine.createSpy('addExpectationResult'),
expectation = jasmineUnderTest.Expectation.asyncFactory({
expectation = privateUnderTest.Expectation.asyncFactory({
matchersUtil: matchersUtil,
customAsyncMatchers: matchers,
actual: 'an actual',
@@ -290,7 +290,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
customAsyncMatchers: matchers,
matchersUtil: matchersUtil,
actual: 'an actual',
@@ -325,7 +325,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
customAsyncMatchers: matchers,
matchersUtil: matchersUtil,
actual: 'an actual',
@@ -358,7 +358,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
actual: 'an actual',
customAsyncMatchers: matchers,
addExpectationResult: addExpectationResult
@@ -392,7 +392,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
customAsyncMatchers: matchers,
actual: 'an actual',
addExpectationResult: addExpectationResult
@@ -421,7 +421,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
customAsyncMatchers: matchers,
actual: 'an actual',
addExpectationResult: addExpectationResult
@@ -455,7 +455,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
customAsyncMatchers: matchers,
actual: 'an actual',
matchersUtil: matchersUtil,
@@ -488,7 +488,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
customAsyncMatchers: matchers,
actual: 'an actual',
addExpectationResult: addExpectationResult
@@ -520,7 +520,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
customAsyncMatchers: matchers,
actual: 'an actual',
addExpectationResult: addExpectationResult
@@ -555,7 +555,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
customAsyncMatchers: matchers,
actual: 'an actual',
addExpectationResult: addExpectationResult
@@ -589,7 +589,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
actual: 'an actual',
customAsyncMatchers: matchers,
addExpectationResult: addExpectationResult
@@ -621,7 +621,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
const expectation = jasmineUnderTest.Expectation.asyncFactory({
const expectation = privateUnderTest.Expectation.asyncFactory({
actual: 'an actual',
customAsyncMatchers: matchers,
addExpectationResult: addExpectationResult
@@ -655,7 +655,7 @@ describe('AsyncExpectation', function() {
};
const addExpectationResult = jasmine.createSpy('addExpectationResult');
let expectation = jasmineUnderTest.Expectation.asyncFactory({
let expectation = privateUnderTest.Expectation.asyncFactory({
actual: 'an actual',
customAsyncMatchers: matchers,
addExpectationResult: addExpectationResult