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('toHaveBeenCalled', function() {
it('passes when the actual was called, with a custom .not fail message', function() {
const matcher = jasmineUnderTest.matchers.toHaveBeenCalled(),
calledSpy = new jasmineUnderTest.Spy('called-spy');
const matcher = privateUnderTest.matchers.toHaveBeenCalled(),
calledSpy = new privateUnderTest.Spy('called-spy');
calledSpy();
@@ -13,16 +13,16 @@ describe('toHaveBeenCalled', function() {
});
it('fails when the actual was not called', function() {
const matcher = jasmineUnderTest.matchers.toHaveBeenCalled(),
uncalledSpy = new jasmineUnderTest.Spy('uncalled spy');
const matcher = privateUnderTest.matchers.toHaveBeenCalled(),
uncalledSpy = new privateUnderTest.Spy('uncalled spy');
const result = matcher.compare(uncalledSpy);
expect(result.pass).toBe(false);
});
it('throws an exception when the actual is not a spy', function() {
const matcher = jasmineUnderTest.matchers.toHaveBeenCalled({
pp: jasmineUnderTest.makePrettyPrinter()
const matcher = privateUnderTest.matchers.toHaveBeenCalled({
pp: privateUnderTest.makePrettyPrinter()
}),
fn = function() {};
@@ -32,8 +32,8 @@ describe('toHaveBeenCalled', function() {
});
it('throws an exception when invoked with any arguments', function() {
const matcher = jasmineUnderTest.matchers.toHaveBeenCalled(),
spy = new jasmineUnderTest.Spy('sample spy');
const matcher = privateUnderTest.matchers.toHaveBeenCalled(),
spy = new privateUnderTest.Spy('sample spy');
expect(function() {
matcher.compare(spy, 'foo');
@@ -41,8 +41,8 @@ describe('toHaveBeenCalled', function() {
});
it('has a custom message on failure', function() {
const matcher = jasmineUnderTest.matchers.toHaveBeenCalled(),
spy = new jasmineUnderTest.Spy('sample-spy');
const matcher = privateUnderTest.matchers.toHaveBeenCalled(),
spy = new privateUnderTest.Spy('sample-spy');
const result = matcher.compare(spy);
@@ -52,8 +52,8 @@ describe('toHaveBeenCalled', function() {
});
it('set the correct calls as verified when passing', function() {
const matcher = jasmineUnderTest.matchers.toHaveBeenCalled(),
spy = new jasmineUnderTest.Spy('sample-spy');
const matcher = privateUnderTest.matchers.toHaveBeenCalled(),
spy = new privateUnderTest.Spy('sample-spy');
spy();