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,12 +1,12 @@
describe('ArrayContaining', function() {
it('matches any actual to an empty array', function() {
const containing = new jasmineUnderTest.ArrayContaining([]);
const containing = new privateUnderTest.ArrayContaining([]);
expect(containing.asymmetricMatch('foo')).toBe(true);
});
it('does not work when not passed an array', function() {
const containing = new jasmineUnderTest.ArrayContaining('foo');
const containing = new privateUnderTest.ArrayContaining('foo');
expect(function() {
containing.asymmetricMatch([]);
@@ -14,36 +14,36 @@ describe('ArrayContaining', function() {
});
it('matches when the item is in the actual', function() {
const containing = new jasmineUnderTest.ArrayContaining(['foo']);
const matchersUtil = new jasmineUnderTest.MatchersUtil();
const containing = new privateUnderTest.ArrayContaining(['foo']);
const matchersUtil = new privateUnderTest.MatchersUtil();
expect(containing.asymmetricMatch(['foo'], matchersUtil)).toBe(true);
});
it('matches when additional items are in the actual', function() {
const containing = new jasmineUnderTest.ArrayContaining(['foo']);
const matchersUtil = new jasmineUnderTest.MatchersUtil();
const containing = new privateUnderTest.ArrayContaining(['foo']);
const matchersUtil = new privateUnderTest.MatchersUtil();
expect(containing.asymmetricMatch(['foo', 'bar'], matchersUtil)).toBe(true);
});
it('does not match when the item is not in the actual', function() {
const containing = new jasmineUnderTest.ArrayContaining(['foo']);
const matchersUtil = new jasmineUnderTest.MatchersUtil();
const containing = new privateUnderTest.ArrayContaining(['foo']);
const matchersUtil = new privateUnderTest.MatchersUtil();
expect(containing.asymmetricMatch(['bar'], matchersUtil)).toBe(false);
});
it('does not match when the actual is not an array', function() {
const containing = new jasmineUnderTest.ArrayContaining(['foo']);
const matchersUtil = new jasmineUnderTest.MatchersUtil();
const containing = new privateUnderTest.ArrayContaining(['foo']);
const matchersUtil = new privateUnderTest.MatchersUtil();
expect(containing.asymmetricMatch('foo', matchersUtil)).toBe(false);
});
it('jasmineToStrings itself', function() {
const sample = [],
matcher = new jasmineUnderTest.ArrayContaining(sample),
matcher = new privateUnderTest.ArrayContaining(sample),
pp = jasmine.createSpy('pp').and.returnValue('sample');
expect(matcher.jasmineToString(pp)).toEqual(
@@ -64,8 +64,8 @@ describe('ArrayContaining', function() {
return true;
}
};
const containing = new jasmineUnderTest.ArrayContaining(['fooVal']);
const matchersUtil = new jasmineUnderTest.MatchersUtil({
const containing = new privateUnderTest.ArrayContaining(['fooVal']);
const matchersUtil = new privateUnderTest.MatchersUtil({
customTesters: [tester]
});